Hi everyone !
I’m currently encountering a problem with a mecanics of throwing the weapon with physics that my character has attached to his mesh socket.
When my character picks up a weapon from the floor, it attaches to the socket on his hand and he can throw it in the direction he’s looking by pressing an input.
I tried two method :
The first method involves destroying the current weapon and spawning a new one at the same transform as the socket, setting physic ON and adding impulse. With this method, I get exactly what I want in terms of physics behavior and trajectory of the weapon BUT it creates a lot of problems when I replicate it for multiplayer. So i don’t want to use this method.
Instead, in the second method, when I want the weapon to be thrown, I use “detach from actor” and then simulate physics and add impulse. This work perfectly fine for replication so that what I want to use BUT the physics and trajectory are completely irregular and behave strangely. Additionaly, the lower the fps are, the more broken the behavior is, witch is not the case with the spawn actor method.
That’s were my problem is, I want the exact same behavior as the spawn actor method but by using the “detach from actor” method.
I’ll share the result of the spawn actor method first, followed by the result from the detach from actor method.
I want to know what’s the difference between what i did, what makes the trajectory different between those two method. Let me know if you need more information or screen shot ! I would have liked to add some videos or screen, but apparently I can’t so sorry