C++ generated components spawn in world space?
I'm having a very weird bug that I've battled with for a few days now. I'm trying to create a system where players can enter and exit vehicles, so my vehicle class has a BoxComponent that is used for overlap events to know when the player is close enough to enter the vehicle. Here is my code:
I then have a blueprint class that inherits from AWheeledVehicleBase, where I adjust the location of the BoxComponent "DriverSeatTrigger" to be near the driver's door. The issue I am having is that when I drag an instance of the vehicle into the scene, the BoxComponent spawns at the origin of the world instead of where it is in the blueprint. The weird thing is that I can "reset" the location of the BoxComponent on the vehicle instance in the world and it will snap to where it's supposed to be. Here's a picture of what's happening:
You can see the BoxComponent located at (1.) at the origin of the world and when I click the reset button at (2.) the BoxComponent snaps to where it should be relative to the vehicle near the driver's door as shown in the blueprint. Any ideas of what's going on here would be greatly appreciated!
asked Apr 03 '19 at 03:02 AM in C++ Programming
Follow this question
Once you sign in you will be able to subscribe for any updates here