Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,089 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Using physX how do I apply force in direction model is facing? #360335
02/23/11 17:48
02/23/11 17:48
Joined: Sep 2006
Posts: 36
Tempe, AZ
B
bpc31 Offline OP
Newbie
bpc31  Offline OP
Newbie
B

Joined: Sep 2006
Posts: 36
Tempe, AZ
I am trying to propel a boat model forward without using any of the tire physic templates but so far I can only rotate left and right. When I apply pXentsetforce local or global it only moves in absolutes not relative to my last rotation. Anyone have a code samples for this?

Re: Using physX how do I apply force in direction model is facing? [Re: bpc31] #360344
02/23/11 18:04
02/23/11 18:04
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline
Expert
Rei_Ayanami  Offline
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rotating the speed/accel vector with the actual rotation would be my solution.

Re: Using physX how do I apply force in direction model is facing? [Re: Rei_Ayanami] #360528
02/24/11 18:15
02/24/11 18:15
Joined: Sep 2006
Posts: 36
Tempe, AZ
B
bpc31 Offline OP
Newbie
bpc31  Offline OP
Newbie
B

Joined: Sep 2006
Posts: 36
Tempe, AZ
Any code samples? I'm not much of a programmer. laugh

Re: Using physX how do I apply force in direction model is facing? [Re: bpc31] #364503
03/18/11 17:56
03/18/11 17:56
Joined: Mar 2010
Posts: 120
Switzerland
T
TehV Offline
Member
TehV  Offline
Member
T

Joined: Mar 2010
Posts: 120
Switzerland
This should work:

Code:
a = cos(me.pan);
b = sin(me.pan);

pXentsetforce(me,vector(a,b,0));



I am not sure about how to use pXentsetforce(), so you might have to adjust that bit. Everything else should work.

Last edited by TehV; 03/18/11 17:57.

Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1