Tokamak Movement?
Blitz3D Forums/Blitz3D Programming/Tokamak Movement?
| ||
I am working on a little tokamak program just trying to learn it. What I have is a box that I want to control with tokamak. Using the arrow keys up,down= move forward back, and left,right for turning. The problem is all the tokamak movement commands use global positioning. So how can I make it move like moveentity works? |
| ||
Try this...If KeyDown(200) Then ;upkey TFormVector 0,0,1,obj(i),0 TOKRB_ApplyImpulse (rb(i),TFormedX#(),TFormedY#(),TFormedZ#()) EndIf If KeyDown(208) Then ;downkey TFormVector 0,0,-1,obj(i),0 TOKRB_ApplyImpulse (rb(i),TFormedX#(),TFormedY#(),TFormedZ#()) EndIf |
| ||
Wow I didn't think it would be that simple! Thank you very much. |