Help to kick box.

Blitz3D Forums/Blitz3D Programming/Help to kick box.

Yue(Posted 2015) [#1]
Hello, I'm actually with fried brain.

I need a box kick direction in which the character looks. This physics using bullet for this, but I think with a basic example Blitz3D can understand the concept and apply it correctly.

A simple example?




NotAGamer(Posted 2015) [#2]
hmmm..

how about using combinations of

collisionx,y,z then aligntovector then moveentity ?


RemiD(Posted 2015) [#3]
Firstly you need to have an animation where the character is kicking something.
Then one way to detect the collision would be :
to set an ellipsoid collider (without response) child of the tip of his feet.
then when the animation is between minframe and maxframe check if a collision happened between the ellispoid collider and the box (or any other thing you want to be able to kick)
then if a collision was detected, depending on the orientation of player toward the box, calculate the corresponding vector
then apply this vector (direction+force) to the box body...

This is the idea i suppose.


Yue(Posted 2015) [#4]
@RemiD



Yue(Posted 2015) [#5]
TFormVector ( 0, 0, 20,personaje\modelo%,0)
		
		cajaON% = LinePick(EntityX(personaje\modelo%), EntityY(personaje\modelo%), EntityZ(personaje\modelo%),  TFormedX(), TFormedY(), TFormedZ(),1)
		
		If cajaON% > 0 Then ; Box collide LinePick
			
			EntityAlpha caja\mesh%, 0.5
		Else 
			EntityAlpha caja\mesh%, 1
		End If 



Any idea to detect the box above to take it in the hands of the character?




Yue(Posted 2015) [#6]
Ok, no problem.