Archive 17/01/2023.

Add Trigger as child to moving object

Uid351324

Hello,
I was trying to make simple detector for character, that already has rigidbody, by adding child node with trigger rigidbody and subscribing to event E_NODECOLLISIONSTART. Scene looks like this:

<node id="4">
	<component type="CollisionShape" id="8" />
	<component type="RigidBody" id="18">
	</component>
	<node id="14">
		<component type="CollisionShape" id="37" />
		<component type="RigidBody" id="38">
			<attribute name="Is Trigger" value="true" />
                </component>
        </node>

The problem is that trigger always stay in same place, do I need to add some constraint for child node, manually change position of trigger based on parent node, or better option drop trigger idea and use ray cast?

Modanung

Try setting the trigger body to kinematic.

Uid351324

Thank you, it worked, now I fill like an idiot.

Modanung

Don’t: You just got wiser! :wink:

…and welcome to the forums, btw. :confetti_ball: