Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark Physics & Dark A.I. & Dark Dynamix / bullet code for dark physics. bulets wont move forward

Author
Message
OnQue Int
16
Years of Service
User Offline
Joined: 8th Jun 2007
Location:
Posted: 22nd Dec 2008 22:48
why can i not get my Bullets to move forward this code must be done with dark physics so i can shoot cloth
roka
16
Years of Service
User Offline
Joined: 2nd Apr 2008
Location:
Posted: 23rd Dec 2008 00:31
i think the "move object b,2" dont work with dark physics

this is some part of my code for my bullets

in my mouseclick



and i check after with function



in "GetCollision()" i check if my bullets have a collision with my world , i use http://forum.thegamecreators.com/?m=forum_view&t=74762&b=5 for my bullets collision

Roka The French Boy
OnQue Int
16
Years of Service
User Offline
Joined: 8th Jun 2007
Location:
Posted: 23rd Dec 2008 16:53 Edited at: 23rd Dec 2008 17:01
Explain this please.. I'm not sure how these varibles are

position object Bullets(Gun(GunSelected).CurrentBullet).Object,camera position X(0),camera position Y(0) ,camera position Z(0)
rotate object Bullets(Gun(GunSelected).CurrentBullet).Object,Player(1).angx#,Player(1).angy#,0

Bullets(Gun(GunSelected).CurrentBullet).Bulletoldx#=camera position X(0)
Bullets(Gun(GunSelected).CurrentBullet).Bulletoldy#=camera position Y(0)
Bullets(Gun(GunSelected).CurrentBullet).Bulletoldz#=camera position Z(0)

Bullets(Gun(GunSelected).CurrentBullet).Fired = 1

dec Gun(GunSelected).CurrentBullet,1

in my code

AW# = current weapon like

if keystate(5)=1
hide object aw#
aw#=m_16
ammo#=M_16am
show object aw#

what is gun(gunselected).... not sure how I would implement it
and it has to be a dynamic object so it will tear cloth
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 23rd Dec 2008 19:52
Only dark physX commands will move your bullet, using 'move object b,2' will not work.

You will have to look up the PHY SET RIGID BODY LINEAR VELOCITY commands as you have to remember that physX now does all the work.

PHY SET RIGID BODY LINEAR VELOCITY b, x#, 1.0, 1.0

Dark Physics makes any hot drink go cold.
OnQue Int
16
Years of Service
User Offline
Joined: 8th Jun 2007
Location:
Posted: 23rd Dec 2008 21:53
I will try that. I really appreciate the help. Also how can I get

the bullets to shoot the way i am aiming? Right now it shoots only

one direction and does not rotate when I do. If I rotate 180

degrees it will shot behind me and not the way i am facing.


Any help is appreciated
Thanks again OnQue
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 24th Dec 2008 17:10
have a look at the ragdoll demo it should show how to move in 3D space and shoot other thing at other angles.

Dark Physics makes any hot drink go cold.

Login to post a reply

Server time is: 2024-05-14 22:31:05
Your offset time is: 2024-05-14 22:31:05