MOVECOLLIDE_FLY projectiles freak out when their velocity is above 4000
8 replies, posted
Titles pretty much sums it up, I'm using projectiles derived from base_anim, with MOVETYPE_FLY, MOVECOLLIDE_FLY_CUSTOM, COLLISION_GROUP_PROJECTILE, and SOLID_BBOX, and whenever their velocity exceeds about 4000, they start flying in totally random directions.
Here it works correctly, with a velocity of 2000:
[media]http://uppix.net/b/5/9/169b4c847d607da3d30eb1f2d7fdb.jpg[/media]
And here it is, with a velocity of 10000:
[media]http://uppix.net/a/f/4/5703e722a94ad4adb61f7d28825bf.jpg[/media]
Any idea why this happens? I tried both SetVelocity and SetLocalVelocity, and they all do the same. It's pretty embarassing because I'm currently coding the Huntsman, and the arrows still seem to be slow with a velocity of 4000.
You could use shadow controls or something else as an alternative.
Have you tried [url=http://wiki.garrysmod.com/?title=PhysObj.SetDamping]PhysObj.SetDamping[/url]?
[QUOTE=ralle105;17466789]Have you tried [url=http://wiki.garrysmod.com/?title=PhysObj.SetDamping]PhysObj.SetDamping[/url]?[/QUOTE]
Yeah.
Set the rotation damping very high and it won't be able to rotate to any random directions anymore.
The velocity gets clamped. 4000 is the maximum velocity which can't be exceeded without hacks. That's my theory.
[QUOTE=Python1320;17468161]The velocity gets clamped. 4000 is the maximum velocity which can't be exceeded without hacks. That's my theory.[/QUOTE]
I believe he's right. To get any faster you need the physics module.
I'll give you a [url=http://www.facepunch.com/showthread.php?t=729841]hint[/url], but you won't know how to use it unless you have [url=http://lmgtfy.com/?q=sv_maxvelocity]this[/url]. With a little bit of [url=http://wiki.garrysmod.com/?title=Lua]this[/url] and a pinch of [url=http://i.somethingawful.com/forumsystem/emoticons/emot-effort.gif]this[/url], everything should work perfectly. :eng101:
[editline]10:08PM[/editline]
Anything to help the TF2 gamemode :3
I think you didn't get my point. :v: I'm not using a physics object, hence the MOVETYPE_FLY (oh just noticed I said MOVECOLLIDE instead of MOVETYPE, my bad). I'm pretty much sure they are way more expensive than simple projectiles, I wouldn't bother myself with a collision model and physics simulation when my projectile is a simple rocket that travels forward at a constant speed.
Anyway, I finally didn't need anything faster than 4000, so it's okay now, thanks for trying to help though.
[QUOTE=Python1320;17468161]The velocity gets clamped. 4000 is the maximum velocity which can't be exceeded without hacks. That's my theory.[/QUOTE]
This man is right.
Sorry, you need to Log In to post a reply to this thread.