Tokamak Movement?

Blitz3D Forums/Blitz3D Programming/Tokamak Movement?

RiverRatt(Posted 2005) [#1]
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?




Sweenie(Posted 2005) [#2]
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




RiverRatt(Posted 2005) [#3]
Wow I didn't think it would be that simple!
Thank you very much.