cancel
Showing results for 
Search instead for 
Did you mean: 

v212 typescript updates

Shards632
Mentor
  • some more infrastructure fussing with `BaseHorizonProperty`, `HorizonReferenceProperty`, etc. presumably to clean up some internals.
  • the options on `Raycast.raycast()` got their own named type: `RaycastOptions`
    • `layerType` and `maxDistance` like before
    • `stopOnFirstHit` is new
      •  if true, returns a 'StaticHit` if the layer or tag do not match. if false, will return a miss if the layer or tag don't match
    •  clarification that if the tags field on the Raycast is unset, it will match entities with any tag.
Upcoming Events:
Build-Along - Unlock the Power of Player Inventories Thursday, May 15th 11:00 AM PT
- Register
May Programming Calendar
1 REPLY 1

Shards632
Mentor

Note that the change to the HorizonReferenceProperty behavior this week may catch some people off guard if you were getting things like Vec3 or Quaternion or Color or whatever from a property, editing its value, and expecting that the value in the cached layer would also update automatically as a side effect.

Such 'side effect' coding is frowned upon, because it makes it very difficult to understand whats going on. This week, with the HorizonReferenceProperty change, they seem to have made it so that things like Vec3, Quaternion, Color, etc return a clone of the cached layer value, rather than the actual value. Any changes you make to the returned value will NOT automatically update the cached value as a side effect.

If you were depending on this behavior, check your code carefully after v212 and make sure you are setting the value back correctly where needed.

Upcoming Events:
Build-Along - Unlock the Power of Player Inventories Thursday, May 15th 11:00 AM PT
- Register
May Programming Calendar