Post anything here that does not fall into the other topic categories.

Camera rotation in Player problem<Solved>

Camera rotation in Player problem<Solved>

Postby CreativeOcclusion » 20 Jul 2015, 01:12

When I play my game in the Player, the camera only rotates until mouse cursor hits the edge of the screen...This does not happen in the editor...In the editor the mouse cursor is hidden...I am using the FPS Kit Player....Thanks
Last edited by CreativeOcclusion on 21 Jul 2015, 06:56, edited 1 time in total.
Thanks, CreativeOcclusion
User avatar
CreativeOcclusion
Skyline Warrior
 
Posts: 366
Joined: 22 Jun 2015, 19:34
Location: Texas

Re: Camera rotation in Player problem

Postby TattieBoJangle » 20 Jul 2015, 02:10

Hi m8 you need to hook the mouse I will do a tut on this tomorrow as it catches a few people out.

Right click in the scene and choose "Lua - SceneScript". The script editor should open.
> If there is not an onInit function, go to the snippets on the side and look under the blue section for "Main Game Events".
Double click on the "Game onInit()" or copy this code:

Code: Select all
obj = 0;
function onInit(objID)
    obj = objID;
end

game.setMouseTrap(1); -- 1 means enable mousetrap, 0 means disable mouse trap.
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: Camera rotation in Player problem

Postby CreativeOcclusion » 20 Jul 2015, 02:43

OK...Thanks, this worked...I had to shut down SkyLine and open scene again to get it to work...One more problem fixed...
Thanks, CreativeOcclusion
User avatar
CreativeOcclusion
Skyline Warrior
 
Posts: 366
Joined: 22 Jun 2015, 19:34
Location: Texas

Re: Camera rotation in Player problem

Postby TattieBoJangle » 20 Jul 2015, 02:47

np I believe its set up like that so it allows users to create games other than fps like point and click games for example but glad you got it working.
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: Camera rotation in Player problem

Postby SolarPortal » 20 Jul 2015, 10:34

yes, it is as tattie says. Skyline is a genre agnostic game engine meaning any type of game can be made. This is why it is optional for mouse wrap to be on. :)

Edit: @Tattie, i surrounded your snippet in code blocks to be more readable. :)
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


Return to Misc

Who is online

Users browsing this forum: No registered users and 4 guests

cron