Author Topic: Showing missile object  (Read 1554 times)

Offline pritom057

  • byte
  • *
  • Posts: 27
    • View Profile
Showing missile object
« on: July 20, 2010, 12:06:32 pm »
Hi, can anybody give me the idea how can I show missile going to it's target.....

Is there something like ray passing in JPCT??

Can anybody please give me some example??

Thanks in advance...........Pritom

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: Showing missile object
« Reply #1 on: July 20, 2010, 08:40:09 pm »
Like a trail or something? I'm not 100% sure which effect you are after...

Offline pritom057

  • byte
  • *
  • Posts: 27
    • View Profile
Re: Showing missile object
« Reply #2 on: July 21, 2010, 06:53:13 am »
Actually I want to move an object one point to another point in straight direction.....

Suppose I want to move a missile from (0,0,0) point to (100,100,100)......

I want to know that is there any function or class that is maintained move object one point to another (I know it is possible increase value of a vector into onDrawFrame function But I want a optimum solution for all object)....

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: Showing missile object
« Reply #3 on: July 21, 2010, 07:58:45 am »
Just translate (Object3D.translate(...)) the object by the appropriate vector in each iteration. There's no magic method that does this on its own.