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
 

How did they create this?

Previous Thread :: Next Thread 
alliancer is not online. alliancer
Joined: 18 Mar 2013
Total Posts: 1016
16 Mar 2017 11:01 AM
https://www.roblox.com/games/625364452/Nerf-FPS-2017-OPEN-ALPHA#!

The game forces first person and has arms(+gun) that smoothly follow your camera with a tiny delay. How did they do this? I assume it's something local because I can't see other players arms
Report Abuse
AggressiveCatch is not online. AggressiveCatch
Joined: 17 Jul 2011
Total Posts: 5840
16 Mar 2017 11:04 AM
do you know how any FPS games are made?
Report Abuse
alliancer is not online. alliancer
Joined: 18 Mar 2013
Total Posts: 1016
16 Mar 2017 11:07 AM
No

could I have some help?
Report Abuse
AggressiveCatch is not online. AggressiveCatch
Joined: 17 Jul 2011
Total Posts: 5840
16 Mar 2017 11:19 AM
"The game forces first person and has arms(+gun) that smoothly follow your camera with a tiny delay. How did they do this? I assume it's something local because I can't see other players arms"

for first person force:
http://wiki.roblox.com/index.php?title=API:Class/Player/CameraMode

the arms are usually fake arms that are welded to the torso/head/other part, and u use fake arms so that you can weld them easily and so that the player can view them in first person

if only the client can view its own arms, then it's because Filtering Enabled is on and the arms and welds were created through localscript so they are not replicated to the server

the tiny delay is due to how the arms are rotated with the camera - the creator made some sort of cframe tweening for the arms to lag like they do

if you need any clarification just ask, that's the best summary I could make
Report Abuse
alliancer is not online. alliancer
Joined: 18 Mar 2013
Total Posts: 1016
16 Mar 2017 11:24 AM
Thanks, this helps. I'm interested in the arms lagging behind the camera, is CFrame tweening the only way this can be done? how would I create it?
Report Abuse
VoidFrost is not online. VoidFrost
Joined: 14 Oct 2011
Total Posts: 1188
16 Mar 2017 11:31 AM
Have you even seen phantom forces? Also while being in the game I noticed that they have utlized this easing method. It is done in-game when people move their camera, the arms sort of flop realistically.

http://wiki.roblox.com/index.php?title=Springs
Report Abuse
AggressiveCatch is not online. AggressiveCatch
Joined: 17 Jul 2011
Total Posts: 5840
16 Mar 2017 11:31 AM
well the creator probably made a function that works like the GUI tweening functions that you can use on ROBLOX

so it was probably something like this:

local tweencounter = 0--use this so tweens don't overlap

function tweenTo(goalcframe) --creator also could have had additional arguments
local thistween = tweencounter
local startcframe = arms.CFrame

local percent = 0
while thistween == tweencounter do --make sure the camera hasn't moved
percent = percent+10/100
arms.CFrame = startcframe:lerp(goalcframe, percent)
wait()
end
end

camera.Changed:connect(function(prop)
if prop == "CFrame" then
tweenTo(camera.CFrame)
end
end)



that's some pretty rough code with plenty of undefined variables and simplifications, but hopefully that gives you some idea
Report Abuse
AggressiveCatch is not online. AggressiveCatch
Joined: 17 Jul 2011
Total Posts: 5840
16 Mar 2017 11:33 AM
my utilisation of lerp would create a linear movement - of course, there's plenty of different lerping/easing methods that you could use to create your desired effect

i was just trying to give you a rough idea of how it was done

also, i completely forgot to use tweencounter, I'd probably add one to it everytime I called tweenTo(), to cut off the previous tween
Report Abuse
alliancer is not online. alliancer
Joined: 18 Mar 2013
Total Posts: 1016
16 Mar 2017 11:36 AM
Thanks a bunch you guys. appreciate the help, I'll be able to handle it from here :)
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