Grab Objects

Post here your suggestions to improve the assets.

User avatar
R4microds
Contributor
Contributor
Posts: 2
Joined: Fri Jan 11, 2019 1:44 pm

Grab Objects

Postby R4microds » Thu Feb 07, 2019 1:50 pm

As the title implies, a simple grab/pickup objects with rigid bodies on OnMouseDown / Keypress. Drag / Rotate / Drop.

This works for the host with Authority but needs to be re-worked for clients:
https://gdl.space/wubenoyoti.cpp
Skoots

User avatar
Lovatto
Admin
Admin
Posts: 1115
Joined: Sun Dec 07, 2014 3:18 pm
Contact:

Re: Grab Objects

Postby Lovatto » Sun Feb 10, 2019 11:01 pm

Only the owner of the object (in this case the Master Client) can write and send the information, others just received it,
in order to others can write too, they need request the ownership of the photonview, in photon you use:

Code: Select all

photonView.RequestOwnership();

you call this when the player grab the object, so you inform that this player will start writing in this object.

User avatar
R4microds
Contributor
Contributor
Posts: 2
Joined: Fri Jan 11, 2019 1:44 pm

Re: Grab Objects

Postby R4microds » Tue Feb 19, 2019 3:51 pm

Works great!

https://youtu.be/BHSaow5nlJU

Thanks Lovatto, another solid addition to this amazing asset!
Skoots

Return to “Requests”

Who is online

Users browsing this forum: No registered users and 1 guest