EasyTok/Tokamak - how to make RB hover?

Blitz3D Forums/Blitz3D Userlibs/EasyTok/Tokamak - how to make RB hover?

Boiled Sweets(Posted 2006) [#1]
Hi,

Is there a way to make an Rigid Body 'float' in the air. For example I have a RB on a floor and want to click on it with the mouse and have it levitate and hover at a certain height. Any ideas?

What does TOK_ApplyForce2 do exactly? Would that help?


Boiled Sweets(Posted 2006) [#2]
Hey Boiled,

how are you doing? I'm fine etc etc

Here's how you do it...

		TOK_PositionRBEntity(g_game_picked_block_name, TOK_GetRBX#(g_game_picked_block_name),200,TOK_GetRBZ#(g_game_picked_block_name))
		body =  TOK_GetRBBody(g_game_picked_block_name)
		TOKRB_SetVelocity(body,0,0,0)
			TOKRB_SetForce (body,0,0,0)
			TOKRB_SetTorque (body,0,0,0)
			TOKRB_SetAngularMomentum(body,0,0,0)