Gamestudio Links
Zorro Links
Newest Posts
Removing outliers from files
by AndrewAMD. 12/02/26 15:26
SGT_FW
by Aku_Aku. 11/30/26 08:19
Experiences with cTrader
by JeyKey II. 11/27/26 09:04
make a complaint
by EW_bytes. 11/26/26 23:00
FXCM => AVA Trade Plugin???
by Martin_HH. 11/25/26 21:59
No connection to MT4
by Martin_HH. 11/23/26 06:38
MinMax function on History t6 file
by LucasJoshua. 11/21/26 14:28
What are you working on?
by rayp. 11/20/26 18:10
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
0 registered members (), 7,381 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EvanTJ, rht, MaliceTheMaker, Haitao_Ren, JimSimons
19250 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Perpendicular collision stops ball #339190
08/25/10 08:40
08/25/10 08:40
Joined: Aug 2010
Posts: 26
J
JHA Offline OP
Newbie
JHA  Offline OP
Newbie
J

Joined: Aug 2010
Posts: 26
Hello
Using physics engine to create ball:

VECTOR BulletPos;
VECTOR vKick;

vec_set(BulletPos.x,camera.x);

eBall = ent_create("ball.mdl",BulletPos,NULL);
set(eBall,SHADOW);
eBall.material = mat_metal;
phent_settype(eBall,PH_RIGID,PH_SPHERE);
phent_setmass(eBall,1,PH_SPHERE);
phent_setfriction(eBall,90);
phent_setelasticity(eBall,85,100);
phent_setdamping(eBall,30,5);

vec_for_angle(vKick.x,camera.pan);

vec_scale(vKick,1000);
phent_addvelcentral(eBall,vKick);

attaching this function to keyboard and when pressing the key, key "shoots" nicely ball to the direction of camera. The only problem is that if ball hits perpendicular (about 90 degrees) to mountain or if I drop it directly towards ground the ball gets stucked and can be there several seconds and then suddenly bounces off. If there is less angle like 45, ball never gets stucked. Any idea how to get rid of this problem. Sed version number is 7.36.1 and engine is v7.86.2 commercial edition.

Can anyone help

Re: Perpendicular collision stops ball [Re: JHA] #340089
08/31/10 18:26
08/31/10 18:26
Joined: Aug 2010
Posts: 26
J
JHA Offline OP
Newbie
JHA  Offline OP
Newbie
J

Joined: Aug 2010
Posts: 26
I was able to solve this by setting parameters of physics engine, no need to answer this.

Re: Perpendicular collision stops ball [Re: JHA] #340092
08/31/10 18:43
08/31/10 18:43
Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
MasterQ32 Offline
Expert
MasterQ32  Offline
Expert

Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
small hint:
use a8 for physic s projects!
those projects are with PhysX and much more easier to handle


Visit my site: www.masterq32.de

Moderated by  HeelX, Spirit 

Gamestudio download | 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