Summary
In Verse, get the item component of a weapon and dropping it then teleporting it to the player should show a weapon.
before 41.00 it worked but checked today and it doesn’t.
here is the code
if (ItemComp := NewWeaponEntity.GetComponent[item_component]):
if (ItemComp.Drop):
if (FortChar := Agent.GetFortCharacter[]):
PlayerTransform := FortChar.GetTransform()
PlayerPos := PlayerTransform.Translation
NewTransform := (/Verse.org/SpatialMath:)transform{
Translation := (/Verse.org/SpatialMath:)vector3{
Left := -PlayerTransform.Translation.Y ,
Forward := PlayerTransform.Translation.X ,
Up := PlayerTransform.Translation.Z
},
Rotation := (/Verse.org/SpatialMath:)rotation{},
Scale := (/Verse.org/SpatialMath:)vector3{Left := 1.0, Forward := 1.0, Up := 1.0}
}
NewWeaponEntity.SetGlobalTransform(NewTransform)
Please select what you are reporting on:
Verse
What Type of Bug are you experiencing?
Scene Graph
Steps to Reproduce
Running code above on a weapon entity (e.g. SemiAutoPistol_BR_PreSeason_Common{})
Expected Result
The weapon drops at the players position
Observed Result
It does not show at all and now error logs
Platform(s)
PC