Expose Player Transform in Udon
tracked
Reimajo
Please allow us to directly manipulate transform of the local player and of his playspace transform in Udon.
Abusing teleport for this is not only misleading, but also not very efficient.
The coolest stuff that people do with Udon uses teleport in every update and there are lots of performance issues doing that. We want to create flying-scripts, locomotion-scripts and better "chairs" for vehicles, doing this with teleport is inefficient.
Also reading and manipulating the playspace transform is important for us as well, e.g. to know where the player is relative to his playspace.
Log In
This post was marked as
tracked
soralin
I think though this would be handy, one caveat: To gain access to a users transforms, a sort of "permission" system should exist.
Something akin to a popup for the user that effectively states "This application would like to control your transforms, Y/N"
To gain control of the player, permission should be given to the app first, for sure. (Though you can have a starting area in your map of course that starts the player off by requesting permission of course)
Goal here is simply speaking to prevent individuals from abusing this by creating troll worlds that take control of the player and make it difficult for them to teleport out.
Whaddageek
If we could use the transforms of player's bones as well it'd make things like putting things on players (clothes, accessories, whatever) far more optimized as well via reparenting.
indominablerexx
Yes, and while we're at it, also allow direct manipulation of the rotation.
Reimajo
indominablerexx: Unity Transform = Position + Rotation
indominablerexx
Reimajo: The reason I said this is that currently, Udon exposes the transform separately as a position and rotation.
Reimajo
indominablerexx: Udon doesn't expose the Transform. Udon in general doesn't expose their own objects. It gives you a function instead that "teleports" the player.
Whatever that does internally is completely unknown, but it works only sometimes under some unknown conditions and most times also does something completely weird and undocumented or just doesn't work at all).
Udon also gives you a function that returns the current position/rotation, but this isn't exposing any ref-type object either.
If you want this TeleportTo() function to have an overload where you can only set position or only rotation instead of both, you should make a Canny about that. But this canny here is about exposing the transform which would mean you can set position or rotation directly. And that's what you asked for. And it's already in the Canny.
indominablerexx
Reimajo: My comment has nothing to do with TeleportTo() having an overload to do either separately. I was agreeing with your post. This canny. So there's no need to make a long comment about it when we were already agreed ;) Good day