Runtime Item Pickup Position Not being Set

RobbieNI

New member
Hi there,

I have created a pickup for a weapon in my game however the position is not being set for it once it has been picked up, despite the fact that this position has been changed in the Third Person Perspective Script. This is shown clearly in the attached screenshots.

Any idea why this isn't being set?

Thanks,
Robbie.
 

Attachments

Andrew

Moderator
Staff member
Does it have a FirstPersonPerspectiveItem component with a different LocalSpawnPosition value? Also, can you log PerspectiveItem.Initialize to make sure its transform.localPosition is being set? (Line 52)
 

RobbieNI

New member
It doesn't have any other PerspectiveItem components on it. I logged the value and it seems to be getting set in code, just not updating the actual position field in the inspector.
 

Justin

Administrator
Staff member
Does the bow/katana get positioned correctly within the demo scene? You can verify that it is being set by setting a breakpoint within PerspectiveItem.Initialize. The localPosition is set at this location.
 

RobbieNI

New member
Yep, the bow/Katana are being set correctly in the demo scene. The breakpoint is also being hit in initialize. As I said the rotation is being set correctly, just not the position so I would assume this also proves that the item is being initialized?
 
Top