Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, dr_panther), 791 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
2.5D physics #345425
10/26/10 07:22
10/26/10 07:22
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Is there any way, to lock physics simulations in some of the directions? For example, how can I move 3D physical objects, only in X and Z coordinates? And lock its Y movement, so they will not move from side to side. Thank you.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: 2.5D physics [Re: 3run] #345431
10/26/10 08:25
10/26/10 08:25
Joined: Jul 2009
Posts: 1,198
Berlin, Germany
L
Liamissimo Offline
Serious User
Liamissimo  Offline
Serious User
L

Joined: Jul 2009
Posts: 1,198
Berlin, Germany
Just put in a while my.y = 0 for example, that locks the Y coordinate. I am using the same in Gravix (nearly, I am having an INVSIBLE | BBOX wall over my level wink


"Ich weiss nicht genau, was Sie vorhaben, aber Sie können keine Triggerzonen durch Ihr Level kullern lassen."
-JCL, 2011
Re: 2.5D physics [Re: Liamissimo] #345434
10/26/10 08:48
10/26/10 08:48
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Setting "my.y" to zero, will not help!! That will only lock the model, but not physics simulations!! I've tried that at once... Invinsible wall may help, but models may stuck...yes, I can set friction to zero, but I need friction for some of the models... I've tried that too as well... I need an other way to lock not models, but physics simulations!


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: 2.5D physics [Re: 3run] #345438
10/26/10 10:05
10/26/10 10:05
Joined: Jan 2004
Posts: 3,023
The Netherlands
Helghast Offline
Expert
Helghast  Offline
Expert

Joined: Jan 2004
Posts: 3,023
The Netherlands
if using PhysX, you can use pXcon_add with PH_6DJOINT and change the joint using pXcon_set6djoint and NX_D6JOINT_MOTION_LOCKED.

regards,


Formerly known as dennis_fantasy
Portfolio - http://www.designorhea.com/
Project - http://randomchance.cherrygames.org/
Re: 2.5D physics [Re: Helghast] #345440
10/26/10 10:23
10/26/10 10:23
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Thank you Helghast. But I'm still using ODE at the moment. Because, to my mind, physX still isn't stable in GS. As well, as A8.
How do I make this with ODE?


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: 2.5D physics [Re: 3run] #345441
10/26/10 10:46
10/26/10 10:46
Joined: Oct 2007
Posts: 5,210
Ä°stanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,210
Ä°stanbul, Turkey
trust TheLiam, he makes a 2.5d physics game, gravix.

Last edited by Quadraxas; 10/26/10 10:51.

3333333333
Re: 2.5D physics [Re: Quad] #345444
10/26/10 10:54
10/26/10 10:54
Joined: Jul 2009
Posts: 1,198
Berlin, Germany
L
Liamissimo Offline
Serious User
Liamissimo  Offline
Serious User
L

Joined: Jul 2009
Posts: 1,198
Berlin, Germany
Code:
my.x = 1354;
			if(mouse_left == 1 && levelnr >= 40 && bomb == 0)
			{
				bomb = 1;
				ent_create("bombe_gravis.mdl",ball.x,bombefunc);
			}
			if(key_a || Xbox_Joystick_Raw_X <= -150)
			{
				phent_addcentralforce(ball,vector(0,1750,0));	
			}
			if(key_d || Xbox_Joystick_Raw_X >= 150)
			{
				phent_addcentralforce(ball,vector(0,-1750,0));	
			}
			if(key_w || Xbox_Joystick_Raw_Y <= -150)
			{
				phent_addcentralforce(ball,vector(0,0,1750));	
			}
			if(key_s || Xbox_Joystick_Raw_Y >= 150)
			{
				phent_addcentralforce(ball,vector(0,0,-1750));	
			}


This is my movement code, I added this my.x = 1354; and it works smooth and perfect wink


"Ich weiss nicht genau, was Sie vorhaben, aber Sie können keine Triggerzonen durch Ihr Level kullern lassen."
-JCL, 2011
Re: 2.5D physics [Re: 3run] #345452
10/26/10 13:27
10/26/10 13:27
Joined: Jan 2004
Posts: 3,023
The Netherlands
Helghast Offline
Expert
Helghast  Offline
Expert

Joined: Jan 2004
Posts: 3,023
The Netherlands
Originally Posted By: 3run
Thank you Helghast. But I'm still using ODE at the moment. Because, to my mind, physX still isn't stable in GS. As well, as A8.
How do I make this with ODE?


To be completely honest with you, this is absolute BS laugh
I have been working lately on a PhysX involved project, and from the start they seem and feel more stable then anything i've ever done with ODE.

Anyway, if you are resetting a physics object every frame using my.x = 0, make sure to disable and enable the physics object as well every frame using phent_enable.

regards,


Formerly known as dennis_fantasy
Portfolio - http://www.designorhea.com/
Project - http://randomchance.cherrygames.org/
Re: 2.5D physics [Re: Helghast] #345454
10/26/10 13:59
10/26/10 13:59
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
To be honest, I've tried physX only when the first beta version of A8 came out. Didn't try it with new version yet)) Is there any other way than locking models X?


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: 2.5D physics [Re: 3run] #345461
10/26/10 15:37
10/26/10 15:37
Joined: Jan 2004
Posts: 3,023
The Netherlands
Helghast Offline
Expert
Helghast  Offline
Expert

Joined: Jan 2004
Posts: 3,023
The Netherlands
Originally Posted By: 3run
To be honest, I've tried physX only when the first beta version of A8 came out. Didn't try it with new version yet)) Is there any other way than locking models X?


Yes, like I said in my previous post:

Originally Posted By: Helghast

Anyway, if you are resetting a physics object every frame using my.x = 0, make sure to disable and enable the physics object as well every frame using phent_enable.


obviously, instead of my.x, you can also do my.y here...

regards,


Formerly known as dennis_fantasy
Portfolio - http://www.designorhea.com/
Project - http://randomchance.cherrygames.org/
Page 1 of 2 1 2

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