Add Trigger as child to moving object


#1

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?


#2

Try setting the trigger body to kinematic.


#3

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


#4

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

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