This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Shooting ball bounce


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
A. Mahone
BANNED
Join Date: Sep 2012
Old 09-29-2012 , 16:54   Shooting ball bounce
Reply With Quote #1

How to stop bounce a shooting ball on the ground, so it just slides above ground, and bounce at walls?
A. Mahone is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 09-29-2012 , 17:10   Re: Shooting ball bounce
Reply With Quote #2

I guess you could try setting its movetype to MOVETYPE_BOUNCEMISSILE, and possibly its velocity's Z axis' value to 0.
Code:
entity_set_int(ent, EV_INT_movetype, MOVETYPE_BOUNCEMISSILE); new Float:velocity[3]; entity_get_vector(ent, EV_VEC_velocity, velocity); velocity[2] = 0.0; entity_set_vector(ent, EV_VEC_velocity, velocity);
Though not sure if by above ground you mean in air or on ground. If you want for it to stay on ground, then setting its gravity to some high value should do the trick.
Code:
entity_set_float(ent, EV_FL_gravity, 9999.9);

Last edited by hleV; 09-29-2012 at 17:14.
hleV is offline
A. Mahone
BANNED
Join Date: Sep 2012
Old 09-29-2012 , 17:44   Re: Shooting ball bounce
Reply With Quote #3

Works nicely thx.
A. Mahone is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:49.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode