Home Game Development collision detection – Simulate Physics causes Actor to fall by means of floor when participant interacts

collision detection – Simulate Physics causes Actor to fall by means of floor when participant interacts

0
collision detection – Simulate Physics causes Actor to fall by means of floor when participant interacts

[ad_1]

I’ve arrange a easy code that enables the participant to make use of a line hint to select up objects and assign them to considered one of three sockets on the character mesh.

Blueprint graph 1

I then arrange the power for the participant to cycle between objects in ‘pockets’ and objects in hand, in addition to dropping the objects.

Blueprint graph 2

Everything works advantageous. The participant can choose objects up and drop them, in addition to cycle them between hand and pocket, so long as ‘Simulate Physics’ is ready to false on the merchandise that’s being picked up. Anything the participant interacts with that has ‘Simulate Physics’ enabled falls by means of the ground upon interplay. that is the physics settings of the thing:

Settings

I would like the code to permit me to select up physics objects. I imagine that the ‘Set Actor Enable Collision’ is the problem as when this isn’t within the loop the Actor doesn’t fall by means of the bottom, nevertheless I have to disable the Actors collision with the participant in any other case motion is hindered. I do not perceive why the ‘Attach Actor To Component’ does not maintain the Actor in place when the Actor ‘Simulate Physics’ is ready to true. I’ve tried including a ‘Set Simulate Physics’ earlier than and after the ‘Attach Actor To Component’. This does cease the Actor from falling by means of the bottom, however the Actor doesn’t hook up with the socket because it does when the physics is turned off within the Panel. I’ve tried setting the ‘Set Simulate Physics’ perform earlier than and after the ‘Attach Actor To Component’, in addition to after ‘Set Actor Enable Collision’. They do cease the gun from falling however the script nonetheless fails to set the Actor to the slot.

[ad_2]

LEAVE A REPLY

Please enter your comment!
Please enter your name here