Thx for your idea. I didn't take this method because I want to have a
better control on the trajectory of the disc (to break it if it comes
straightforward to the surface it reflects on, etc...).
I got it to work anyway. I have set a think function in the Touch
function. Then I re-set the right velocity to the projectile in the think
function (just the frame after the touch function has been called) and it
works.
After reflection, I figured out the problem I ran through was not a bug.
The fact that a projectile goes along the wall when it hits it is made for
the hornetgun. The hornets have exactly this behaviour : when they encounter
a wall, they move along it. It must be handled in the engine somewhere after
the call of DispatchTouch for the projectile...
So, my solution is a kind of hack, but it works ;)
- Cortex : HL ALBATOR coder & mapper
- [EMAIL PROTECTED] & ICQ : 71548738
omega wrote:
> Why not just set MOVETYPE_BOUNCEMISSILE
> Or whatever it is? So it flies like a rocket (with no gravity) and
> bounces?
>
>
> -omega
> Frontline Force - http://www.flfmod.com
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Cortex
> Sent: March 5, 2003 2:38 PM
> To: [EMAIL PROTECTED]
> Subject: [hlcoders] velocity
>
> Hi,
>
> I'm stuck in a very weird bug there... I want to create a weapon
> as the
> discs launcher in Unreal Tournament (1). So, my weapon should throw
> projectiles (model) that rebounds on each wall.
>
> I've managed to code the whole thing. Actually, I set a touch
> function
> and when the disc's touching a wall, I do some calculation with the
> plane
> normal and the velocity to get the new velocity vector. Then I set the
> new
> calculated velocity to pev->velocity.
>
> When the Touch function terminates, all is right, pev->velocity
> has the
> right value.
>
> The problem is *after*. The engine (I suppose) changes the
> velocity of
> the object and one of its value (x, y or z) is reseted to 0 !! It's
> always
> the axis of the plane normal that is reseted to 0 in pev->velocity :(
> So, my
> projectile moves along the wall...
>
> I've tried several things as setting a think function to see the
> evolve
> of the pev->velocity, but at any think call, pev->velocity.x (or y, or
> z) is
> 0. I cannot change this... I tried to move the object away from the
> wall not
> to get him stuck in it, but it didn't resolve the pb :(
>
> Hey ! What's the matter ???
> Thx in advance for any answer and feel free to ask for deeper
> explanations
> if I didn't good explain...
>
> - Cortex : HL ALBATOR coder & mapper
> - [EMAIL PROTECTED] & ICQ : 71548738
>
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list
> archives, please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders