Do i use code for this?
CFrames? I’m really confused on how to get this working.
Info: I’d like for the Model to follow my Hand’s speed, so it doesn’t fall off when i move my hand.
Do i use code for this?
CFrames? I’m really confused on how to get this working.
Info: I’d like for the Model to follow my Hand’s speed, so it doesn’t fall off when i move my hand.
Hello.
You’re gonna be using VR Support. For more info on it, I advise checking it on the Documents.
Here is the link:
Also, you’re gonna be lerping CFrames, to move them to the desired mouse location (which is called something different on VR but has the same function).
This is offtopic. What are you talking about?
Alright. I was talking about VR. I believe that is supported the best in VR but if you still want to do it you can create viewmodels for it. Even in the video you can see that this was recorded on VR. You can create VR hands. But as I have never created anything for VR before, the only thing that I can advice you is a viewmodel.
Example Usage:
A local script:
local viewmodel = Instance.new("Part") -- Example viewmodel
viewmodel.Parent = workspace.CurrentCamera -- Parent it to the player's camera.
This way, you might get something similar to it but it won’t be the exact same. By improving it you might get something better. Keep in mind that this is only an example code snippet. As CanCollide is on in the part model you can grab NPCs with it.
Also, by going in further in the documents I’ve realized I sent you the wrong document, and I couldn’t find anything similar to this. If this does not meet your expectations, try searching it on the DevForum.
I’m sorry, I don’t think i explained myself clearly, I need to find out how a model, for example the noob from the video. The video shows ME picking up the Noob with my own hands. (the 2 big parts), in the video, when I move my hand a little, the noob doesn’t move along with it and falls down, what I’d like to achieve, is for the noob to stay on my hand, and keep it’s current speed.
I think settings the NetworkOwner of the primary part of the model to the player will transfer all the physics to you. I don’t really have knowledge in VR scripting but this in theory should help
Me neither. Combining both your and mine ideas would do work. If that does not keep working,
I suggest searching it on the DevForum, again.
It’s already doing that.
function NetworkTouch(Player, Character, Hit)
pcall(function()
if not (Hit:IsDescendantOf(Character)) and Hit.Name ~= "Handle" and not Players:GetPlayerFromCharacter(Hit.Parent) and not Hit.Anchored and Hit.CanCollide then
if Hit:GetNetworkOwner() == nil then
Hit:SetNetworkOwner(Player)
end
end
end)
end
(I am using the .rbxl file from VR Sandbox (opensourced place-file) - #10 by Cullis_wullisAlt)
By looking at the code I think I found a flaw.
If Im not mistaken, certain limbs of the character are set to CanCollide being false (such as the legs, arms and head) maybe set them to can collide true?
I just tried setting all of the NPC’s limbs to cancollide, there is no difference
I think the best bet would be using constraints, since using code to constantly update an object’s position to follow the hand is probably not a good idea.
You could also maybe try copying the AssemblyLinearVelocity of the hand to the object’s PrimaryPart/root part every physics step.