Hey, I have a simple door opening system with timelines:
The thing is that if the player stands near the door, the door will clip them, and i want to make the door push the player instead.
How can i do this? thx in advance
Hey, I have a simple door opening system with timelines:
How can i do this? thx in advance
Can you check if you have physics on for both actors? (The door and the player)
you mean simulate physics checkbox? in both its disabled
Try enabling those and also set up collisions accordingly if they’re not already (meaning if they currently don’t bump into each other while the door is still)
doing that just makes player unable to move and doors falling
I see. How does your door work? Does it have the movable part as a component? Could you try enabling the physics just for the collision bounds that follow that part? Or if it doesn’t have collisions on there, you can add a box collision and place it accordingly. And also make sure to set the collision to block all.
As for the player not moving, I did a lil researched on it and turns out the movement component can’t work while the physics are enabled (i think i actually recall that but couldn’t remember today) so go ahead and disable that. And if the door doesn’t push the player this way, we would need to take a different apprach. You could disable the physics from the box collision that the door part of your complete door asset follows but keep the collision there. And instead use the launch character node to make the player move away when the collision occurs. Sorry for my previous response, I hope everything works out this time
I see, dont worry
And for launching the character, how should i setup it? I’m aware that i need to use a branch to detect if the door overrides the player but what parameters do i add to the launch node?
You can use the “Event Begin Overlap” node to detect collisions and check if the player is the one that’s being collided with the door using the “== (object)” and branch nodes, or vice versa if you wanna handle that code in the player’s character blueprint.
As for the launch character node, plug the player character into it’s target pin, and for it’s launch velocity pin we wanna use the vector that’s perpendicular the the surface of the movable part of the door. There are more dynamic ways of achieving this but I think the easiest approach in this case would be using the existing rotation variable you got there in your timer. You can make a (x= 1, y = 0, z = 0) unit vector using the “Make Vector” node, and plug it into a “Rotate Vector” node. Then get that rotation variable, incremenet it by 90 degrees, split the purplish grey pin of the Rotate Vector node and plug it into it’s z axis. Now this is still a unit vector, so to give it some magnitude, you can multiply it by a desired value. When you plug the vector type result into a multiplication node, you’ll see that the other pin also requires a vector type input. You can right click on it and change it to be float (single precision). Finally, you can plug the result into the “launch velocity” pin of the Launch Character node. Hope this helps!
Can you check if:
Ok now the event works but nothing happens
Could you try checking that X-Y Override option?
(Also try intensifying the launch velocity for debugging purposes)
it works now, tysm for the help really