Wednesday, November 9, 2022
HomeGame Developmentcollision detection - Simulate Physics causes Actor to fall by means of...

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


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

Blueprint graph 1

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

Blueprint graph 2

All the things works nice. The participant can choose gadgets 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. Something 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 want the code to permit me to choose up physics gadgets. I consider that the ‘Set Actor Allow Collision’ is the problem as when this isn’t within the loop the Actor doesn’t fall by means of the bottom, nonetheless I have to disable the Actors collision with the participant in any other case motion is hindered. I do not perceive why the ‘Connect Actor To Part’ would 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 ‘Connect Actor To Part’. 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 ‘Connect Actor To Part’, in addition to after ‘Set Actor Allow Collision’. They do cease the gun from falling however the script nonetheless fails to set the Actor to the slot.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments