generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Forcing Mouse Lock...

Previous Thread :: Next Thread 
shred1894 is not online. shred1894
Joined: 30 Aug 2009
Total Posts: 6515
15 Oct 2013 07:40 PM
I am wondering if it is possible to force mouselockswitch, but where it is always on.

It would make my life a lot easier for this game I am working on, but I am not sure if it is possible.

If it is possible, how would I go about doing it?
Report Abuse
AndroidKitKat is not online. AndroidKitKat
Joined: 21 Sep 2013
Total Posts: 1525
15 Oct 2013 08:05 PM
Real ML? Impossible. Simulated? Yes.
Report Abuse
shred1894 is not online. shred1894
Joined: 30 Aug 2009
Total Posts: 6515
15 Oct 2013 08:07 PM
Dang, I didn't want to have to make a third person mouse lock system.

Oh well, I still have my fallback option of invisible floating head that the cam is attached to behind and to the right of your character.
Report Abuse
AndroidKitKat is not online. AndroidKitKat
Joined: 21 Sep 2013
Total Posts: 1525
15 Oct 2013 08:08 PM
That's exactly what I planned to do too, I was planning to make a Third-person shooter.
Report Abuse
shred1894 is not online. shred1894
Joined: 30 Aug 2009
Total Posts: 6515
15 Oct 2013 08:11 PM
I am working on some game called Abandoned Destiny, it is supposed to be a 3rd Person Sci-Fi Shooter RPG.
Report Abuse
evolvedpikachu is not online. evolvedpikachu
Joined: 18 Aug 2010
Total Posts: 10696
15 Oct 2013 09:11 PM
u use haxy camera interpolation and mouse icon skillz
Report Abuse
shred1894 is not online. shred1894
Joined: 30 Aug 2009
Total Posts: 6515
15 Oct 2013 09:13 PM
Well, I want to keep this as non-haxxy as I can.

Changing the C0 of the neck joint is what my fallback option entails, then it locks into FPS, and has a psuedo character that is in workspace welded to your torso and joints.

It leaves an unclean feeling, but it is the simplest solution I could come up with in 5 minutes.
Report Abuse
Causticity is not online. Causticity
Joined: 11 Jun 2012
Total Posts: 530
16 Oct 2013 09:46 AM
That's what I did at my third person place. The problem is the head wont fall through parts so if you walk off a ledge your head will just sit there.
Report Abuse
SCP087Project is not online. SCP087Project
Joined: 29 Sep 2013
Total Posts: 198
16 Oct 2013 12:55 PM
I did it too. It's quite easy, infact.
Report Abuse
shred1894 is not online. shred1894
Joined: 30 Aug 2009
Total Posts: 6515
16 Oct 2013 08:27 PM
Causticity, cancollide = false

And some fancy raycasting to determine if there is a wall by your torso.
Report Abuse
TheOneSwordfighter is not online. TheOneSwordfighter
Joined: 18 Feb 2013
Total Posts: 212
16 Oct 2013 08:30 PM
@Causticity

Wait you're alive!?
It's LuaWeaver/BrandonFireflower/That guy you may or may not hate/The guy that talked with you a lot on LL.
Add me on Skype; just PM me, or check your history, for we talked once there.

while obamacare() do benefitMiddleClass() end --LuaWeaver
Report Abuse
shred1894 is not online. shred1894
Joined: 30 Aug 2009
Total Posts: 6515
16 Oct 2013 11:52 PM

Char.Torso.Neck.C0 = CFrame.new((Char.Torso.CFrame.lookVector*(8))+Vector3.new(0,2.5,0))*CFrame.fromEulerAnglesXYZ(math.rad(-90), 0, math.rad(-180))

function HeadPanController()
    while true do
    prtt,pos = game.Workspace:FindPartOnRay(Ray.new(Char.Head.Position,(Char.Head.Position-(Char.Head.Position+Vector3.new(0,5,0)))),Char)
        if prtt and pos then
            else
            prtt,pos = game.Workspace:FindPartOnRay(Ray.new(Char.Head.Position,(Char.Head.Position-(Char.Head.Position-Vector3.new(0,5,0)))),Char)
        end
        if prtt and pos then
            if (pos-Char.Head.Position).Magnitude < 5 then
                dec = (5-(pos-Char.Head.Position).Magnitude)/5
                Char.Torso.Neck.C0 = CFrame.new((Char.Torso.CFrame.lookVector*(8-(dec/4)))+Vector3.new(0,2.5-(dec/4),0))*CFrame.fromEulerAnglesXYZ(math.rad(-90), 0, math.rad(-180))
            else
                Char.Torso.Neck.C0 = CFrame.new((Char.Torso.CFrame.lookVector*(8))+Vector3.new(0,2.5,0))*CFrame.fromEulerAnglesXYZ(math.rad(-90), 0, math.rad(-180))
            end
        else
            Char.Torso.Neck.C0 = CFrame.new((Char.Torso.CFrame.lookVector*(8))+Vector3.new(0,2.5,0))*CFrame.fromEulerAnglesXYZ(math.rad(-90), 0, math.rad(-180))
        end
        wait(.03)
    end
end
coroutine.resume(coroutine.create(HeadPanController))

For whatever reason, it moves the head to the side, even though I am not doing anything that would make the head move to the left or right in the code...

I do have it moving inwards and back though.

Any ideas why this is moving my head sideways?
Report Abuse
Causticity is not online. Causticity
Joined: 11 Jun 2012
Total Posts: 530
17 Oct 2013 12:20 AM
Hi LuaWeaver

shred,

Why dont you just weld a pseudo character to the real one and then make a weld in the head part0 = real head and part1 = pseudo character head co = CFrame.new() c1 = some offset I use something like (2.5,1.5,5)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image