Help with your scripting

the default camera didn't move.

the default camera didn't move.

Postby ant0N » 15 Aug 2015, 12:01

Hi all!!! ;)
how to make a the default camera did not move when you press the w,s,d,a?
Sorry for my English. :)
User avatar
ant0N
Skyline Moderator
Skyline Moderator
 
Posts: 415
Joined: 02 Nov 2012, 12:49
Location: Россия, Москва
Skill: Programmer
Skill: 3D Modeller

Re: the default camera didn't move.

Postby TattieBoJangle » 15 Aug 2015, 12:34

Hi anton if you are talking about the camera 2D Fixed you have to attach the physXPlayer Controller to allow movement and from there you can assign what key does what :)
Case: CM Storm Trooper CPU: I7 5930k X99 Cooler: Noctua NH-D15 Graphics: Asus GTX 1080 Motherboard: Rampage Extreme V x99 Ram: RipJaws DDR4 3000mhz Storage: x2 SSD Crucial 500GB + x5 2TB Hdd PSU: Evga 1500w OS: Windows 10
User avatar
TattieBoJangle
Community Manager
Community Manager
 
Posts: 858
Joined: 26 Jan 2015, 00:15
Location: United Kingdom
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer
Skill: Great creative

Re: the default camera didn't move.

Postby ant0N » 15 Aug 2015, 12:52

Hi? Tattie!
I made my characterController using lua and strapped the camera to him, and I don't want the camera move separately. :)
Sorry for my English. :)
User avatar
ant0N
Skyline Moderator
Skyline Moderator
 
Posts: 415
Joined: 02 Nov 2012, 12:49
Location: Россия, Москва
Skill: Programmer
Skill: 3D Modeller

Re: the default camera didn't move.

Postby TattieBoJangle » 15 Aug 2015, 13:01

ahh I see m8 does the script work if say you attach it to something like a box that would rule out the script.
Case: CM Storm Trooper CPU: I7 5930k X99 Cooler: Noctua NH-D15 Graphics: Asus GTX 1080 Motherboard: Rampage Extreme V x99 Ram: RipJaws DDR4 3000mhz Storage: x2 SSD Crucial 500GB + x5 2TB Hdd PSU: Evga 1500w OS: Windows 10
User avatar
TattieBoJangle
Community Manager
Community Manager
 
Posts: 858
Joined: 26 Jan 2015, 00:15
Location: United Kingdom
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer
Skill: Great creative

Re: the default camera didn't move.

Postby SolarPortal » 15 Aug 2015, 15:06

if it is for the default scene camera that you fly around the world with, then you can either:

1) go to the top right of the viewport an in camera icon drop down goto "Camera Mode > Fixed".
2) When the game is initialised, use this command:
Code: Select all
camera.setCameraMode("Fixed");


But the best way would be to add a "2D Fixed camera" from the RMB + context menu of the scene and set it as the active camera as tattie suggested. This will then overwrite the scene camera and allow full customization, and is fully programmable through lua.

Hope this helps :)
Skyline Game Engine - Lead Dev.
Please provide as much info as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 4770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860

Twitter: @SolarPortal
Instagram: @SolarPortal
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: the default camera didn't move.

Postby ant0N » 15 Aug 2015, 15:33

thanks for the help guys! :D
Sorry for my English. :)
User avatar
ant0N
Skyline Moderator
Skyline Moderator
 
Posts: 415
Joined: 02 Nov 2012, 12:49
Location: Россия, Москва
Skill: Programmer
Skill: 3D Modeller


Return to Lua Scripting

Who is online

Users browsing this forum: No registered users and 9 guests