Trying to identify that a player is looking at another Player or NPC and then act upon information from the result. I used player raycast(CollisionType.PLAYERS, I cant seem to find the Replacement in the new API?
What is the new CollisionType.PLAYERS ?
- angriff
- Thread is Unresolved
A new update is now available, introducing a lot of new content!
Latest hotfix: 0.7.5.1 (2024-09-02)
Latest hotfix: 0.7.5.1 (2024-09-02)
-
-
The Javadoc contains an example about that
Basically you need to provide a bitmask of the Layers you want to include in the raycast. Do not use the layers directly, instead create a bitmask with the Layer.getBitmask() method. Other players have the Layer "REMOTEPLAYER", so getting the bitmask or performing the raycast would look like this:
-
The Javadoc contains an example about that
Basically you need to provide a bitmask of the Layers you want to include in the raycast. Do not use the layers directly, instead create a bitmask with the Layer.getBitmask() method. Other players have the Layer "REMOTEPLAYER", so getting the bitmask or performing the raycast would look like this:
Ok thanks, I read the JAVDOC but it appeared I would have had to go through several layers of looking, getting the Id (which I was not sure of for another player), getting the name and identifying it that way. The .RemotePlayer seems more like the old .Players. Thanks again.
and for the readers dont forget to;
import net.risingworld.api.utils.Layer;
-
So sad...
Netbeans lost my project and the old files are corrupted.
Managed to reconstruct it off an older version. Not as slow since I had already looked everything new up.
Participate now!
Don’t have an account yet? Create a new account now and be part of our community!