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
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (VoroneTZ, TipmyPip), 1,333 guests, and 0 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
Rolling sphere on plain #235461
11/07/08 19:53
11/07/08 19:53
Joined: Aug 2006
Posts: 155
R
RyuMaster Offline OP
Member
RyuMaster  Offline OP
Member
R

Joined: Aug 2006
Posts: 155
Hi! I have sphere-like mdl file, rolling on mdl box. I used sample from G7 flder and adapted it:

Quote:
phent_settype(player,PH_RIGID,PH_SPHERE);
phent_setmass(player,1,PH_SPHERE);
phent_setfriction(player,0);
phent_setelasticity(player,75,100);
phent_setdamping(player,30,5);
// phent_addvelcentral(player,vector(10,10,0));
ph_setgravity(vector(0,0,-500));


Now, sphere rolls fine in direction given with phent_addvelcentral. If I set phent_addvelcentral to 0, it stops. Now, what I
do is make box plane model tilt by 15 degree. My idea is: if plane is tilt, ball will start rolling down. But it is not. Ball, actually,
rotates along with plane. Like, if I set

plane.tilt += 1; //every frame

plane rotates, and so does my spehere model. How can I adjust interaction the way I need?
Regards,
Konstantin.


What kills me not, that makes me stronger.

***Working on RPG/RTS***
Re: Rolling sphere on plain [Re: RyuMaster] #235479
11/07/08 21:18
11/07/08 21:18
Joined: Mar 2005
Posts: 564
/www/europe/ germany/index.php
TSG_Torsten Offline

User
TSG_Torsten  Offline

User

Joined: Mar 2005
Posts: 564
/www/europe/ germany/index.php
Already set "my.polygon=on;" for the plane below?
And does your level has a hollow block with flag "sky"? The physic engine may need this.

Regards
TSGames

Re: Rolling sphere on plain [Re: TSG_Torsten] #235487
11/07/08 22:32
11/07/08 22:32
Joined: Aug 2006
Posts: 155
R
RyuMaster Offline OP
Member
RyuMaster  Offline OP
Member
R

Joined: Aug 2006
Posts: 155
Hi! Yes, polygon is enabled for floor plane through the WED. I have sky plane created with ent_createlayer. But now I have tried to add hollow cube through WED and set is property to SKY - still the same result. I'll try to tweak parameters, there is gotta be a mistake in some action I did...


What kills me not, that makes me stronger.

***Working on RPG/RTS***
Re: Rolling sphere on plain [Re: RyuMaster] #235491
11/07/08 22:57
11/07/08 22:57
Joined: Aug 2006
Posts: 155
R
RyuMaster Offline OP
Member
RyuMaster  Offline OP
Member
R

Joined: Aug 2006
Posts: 155
Now I did few testing. I placed entity very high on start, and gave plane zero tilt value.
Entity falls, and bounces fine.
Now, if I tilt plane a bit, like for 15 degree, entity stays in place, but falls deeper into plane box.
The same result, if I tilt box from start. Entity falls deep into plane mesh and bounces, ignoring its top surface... HMMM.


What kills me not, that makes me stronger.

***Working on RPG/RTS***
Re: Rolling sphere on plain [Re: RyuMaster] #235869
11/10/08 16:30
11/10/08 16:30
Joined: Sep 2005
Posts: 274
Switzerland - Zurich
zwecklos Offline
Member
zwecklos  Offline
Member

Joined: Sep 2005
Posts: 274
Switzerland - Zurich
Hi Ryu,
Have you tried to scale up your plain and your sphere model?
What happens when you decrease gravitaion (from -500 to -386)?

cheers

Re: Rolling sphere on plain [Re: zwecklos] #235870
11/10/08 16:44
11/10/08 16:44
Joined: Aug 2006
Posts: 155
R
RyuMaster Offline OP
Member
RyuMaster  Offline OP
Member
R

Joined: Aug 2006
Posts: 155
Hi! Now, I got it working only by setting c_updatehull(ground, 0) every frame.

c_setminmax is not working.

So, is it normal, that I have to use hullupdate when I tilt objects?

All the time before, sphere ball was colliding with plane like plane had tilt 0, no matter what tilt it had in fact.

Also, if I use frame vertex animation for tilting plane, then even c_updatehull stops working.

Anyone had similiar experience or I'm the only unhappy person there?

I tweaked many parameters, gravitation as well. Currently I have got into one other problem. Sphere falls on my plane, bounces 1 time up, and second time it passes the plane with no collision. Like, it bounces with the plane if I place it on z = 200 starting distances, on distances from 100 to 200 it always passes through ground plane. I have normal scaled models, I tryed different geometry (like making box from plane). Do I have to set up something to make collision more percise?


What kills me not, that makes me stronger.

***Working on RPG/RTS***
Re: Rolling sphere on plain [Re: RyuMaster] #235871
11/10/08 16:49
11/10/08 16:49
Joined: Aug 2006
Posts: 155
R
RyuMaster Offline OP
Member
RyuMaster  Offline OP
Member
R

Joined: Aug 2006
Posts: 155
Was there any newton wrapper for A7? I can only see beta-one on the forums. Or the newton wrapper was only for A6? Because one more day and I gonna kill myself 0_0


What kills me not, that makes me stronger.

***Working on RPG/RTS***
Re: Rolling sphere on plain [Re: RyuMaster] #236123
11/11/08 22:39
11/11/08 22:39
Joined: May 2008
Posts: 123
B
BES Offline
Member
BES  Offline
Member
B

Joined: May 2008
Posts: 123
Hey RyuMaster,

I'm making a golf simulation, so I've had to deal with a number of the things you are.

Some things to try:
1) make sure to place some objects at the extremes of your world. Even with a skybox, the physics simulation is limited to the minimum boundaries necessary to encompass the root positions of all the items in your scene. Note that an object's "position" is frequently in the center of your object, so a single large block will not expand your boundaries at all.

2) Regarding falling through the ground, you will need to add safeguards to protect against this. Using c_trace to shoot a ray from your previous position to your current position should help to determine if you passed through something you shouldn't have.

3) The documentation suggests not to leave gravity pressing on your object all the time when it is on the ground. I dealt with this by reducing gravity drastically when my ball stops bouncing and starts rolling. You can manually add velocity that is gravity's contribution along the slope that your ball is on. Since you seem to have gotten addcentral working already, this shouldn't be too difficult for you.

There are many many things that can get in the way of physics, so make sure to start out with a super simple level, i.e. just a plane, ball, boundary expanders, and a hollow cube for a sky, then work from there.

Hope this helps!

Re: Rolling sphere on plain [Re: BES] #236132
11/12/08 00:44
11/12/08 00:44
Joined: Aug 2006
Posts: 155
R
RyuMaster Offline OP
Member
RyuMaster  Offline OP
Member
R

Joined: Aug 2006
Posts: 155
Thanks a lot! Yes, actually, step by step, little by little I found solutions and workarounds, and your tips helped in 1 certain situation. But, sight, well... It is programming, anyway smile


What kills me not, that makes me stronger.

***Working on RPG/RTS***
Re: Rolling sphere on plain [Re: RyuMaster] #236138
11/12/08 03:35
11/12/08 03:35
Joined: Sep 2005
Posts: 274
Switzerland - Zurich
zwecklos Offline
Member
zwecklos  Offline
Member

Joined: Sep 2005
Posts: 274
Switzerland - Zurich
Hi Ryu,
I dont know if you still need help for your issue.
Anyway here you may find a possible solution for your problem.

swinging platform

cheers

Zwecklos

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