Hi guys, I don't understand how to shoot a bullet correctly with
Dark Dynamix for a
FPS. I am lost with sin, and cos.
I have played with the demo Cloth from Dark Dynamix,and read (
http://forum.thegamecreators.com/?m=forum_view&t=197384&b=30) where is a shotting system. But Can't shoot in every angle, front the camera.
power# = 60000
DYN SET POSITION bullet, camera position X(camera0), camera position Y(camera0), camera position Z(camera0)
camAngleX# = camera angle x(camera0)
camAngleY# = camera angle y(camera0)
camAngleZ# = camera angle z(camera0)
xForce# = power# * sin(camAngleY#) * cos(camAngleX#)
yForce# = -power# * sin(camAngleX#)
zForce# = power# * cos(camAngle#) * cos(camAngleX#)
DYN SET ROTATION bullet, camAngleX#, camAngleY#,camAngleZ#
DYN ADD LOCAL FORCE bullet, xForce#, yForce#, zForce#
Thanks for the halp !