Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by AndrewAMD. 12/05/23 10:56
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
6 registered members (3run, AndrewAMD, alibaba, fairtrader, ozgur, TipmyPip), 605 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
[Newton] How to reset the car position #45641
05/13/05 07:37
05/13/05 07:37
Joined: May 2005
Posts: 4
Singapore
Melante Offline OP
Guest
Melante  Offline OP
Guest

Joined: May 2005
Posts: 4
Singapore
Hello everyone, this is my first post to this forum!
Going through the posts I found several messages enquirying how to reset the Newton car position. Since I have just solved this issue, I thought of writing down a few lines so as to help those who are still struggling with this little problem. Here we go:
Assuming you have something like

entity* p_vehicle;

with p_vehicle pointing to the Newton car, you should declare a function like this:

function ResetMyPosition()
{
var car;

p_vehicle.roll = 0;
p_vehicle.tilt = 0;
p_vehicle.pan = 0;

car = NewtonGetBody (p_vehicle);

NewtonBodySetTransform(car);
}

and then call this by pressing a particular key when your car needs some... "maintance"
E.G. for calling it by pressing the "r" key:

on_r = ResetMyPosition();

That's it!
All the best!
Roberto

Re: [Newton] How to reset the car position [Re: Melante] #45642
05/13/05 18:33
05/13/05 18:33
Joined: Dec 2001
Posts: 2,172
Portugal - Brazil
XNASorcerer Offline
Expert
XNASorcerer  Offline
Expert

Joined: Dec 2001
Posts: 2,172
Portugal - Brazil
Can you do the same with A6 physics engine?

Re: [Newton] How to reset the car position [Re: XNASorcerer] #45643
05/14/05 01:34
05/14/05 01:34
Joined: May 2005
Posts: 4
Singapore
Melante Offline OP
Guest
Melante  Offline OP
Guest

Joined: May 2005
Posts: 4
Singapore
I am sure it's possible but in my lab we are still evaluating GameStudio so we don't have any chance of experimenting with the A6 physics engine.
all best,
Roberto

Re: [Newton] How to reset the car position [Re: Melante] #45644
05/14/05 14:10
05/14/05 14:10
Joined: Dec 2001
Posts: 2,172
Portugal - Brazil
XNASorcerer Offline
Expert
XNASorcerer  Offline
Expert

Joined: Dec 2001
Posts: 2,172
Portugal - Brazil
Ok. Thanks.

Re: [Newton] How to reset the car position [Re: XNASorcerer] #45645
06/25/05 10:53
06/25/05 10:53
Joined: Feb 2005
Posts: 728
Germany, Berlin
Asse Offline
Developer
Asse  Offline
Developer

Joined: Feb 2005
Posts: 728
Germany, Berlin
How can I give these Newton objects a pointer.

I normaly do this in the action of an non-Newton object but now I have to give the object a Newton action.


A6.31.4 Commercial AMD Athlon XP 2400+ Radeon 9800Pro 512MB DDR-Ram Windows XP Professional SP2 3D GameStudio Magazin
Re: [Newton] How to reset the car position [Re: Asse] #45646
07/14/05 22:34
07/14/05 22:34
Joined: Sep 2002
Posts: 344
São Paulo SP Brazil
Marcio Esper Offline
Senior Member
Marcio Esper  Offline
Senior Member

Joined: Sep 2002
Posts: 344
São Paulo SP Brazil
Hey Melante,

Good contribuition

Using to advantage that you use Newton and you seems to be experienced in this I would like to ask if you know a way how I can creat a car during the course of the game or if it is possible or not.

Thank you very much for attention and sorry my terrible English.

Best regards,

Marcio

Re: [Newton] How to reset the car position [Re: Marcio Esper] #45647
09/28/05 14:54
09/28/05 14:54
Joined: May 2005
Posts: 4
Singapore
Melante Offline OP
Guest
Melante  Offline OP
Guest

Joined: May 2005
Posts: 4
Singapore
Hello Marcio,

sorry for not having replied earlier but I didn't check these forums in the last months since I was working with other tools and only now I am taking 3DGS again (yeah, it's the best I have been working with! ;-) ).

I think you have to define all your entities/models at the beginning and can't "create" one during the game, nonetheless there should be no problem in keeping a car "hidden" somewhere and then display it when needed giving the impression it was newly created from nowhere.

All best,
Roberto


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