Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Camera movement following an object and mouse control....help!(New)

Author
Message
doug
6
Years of Service
User Offline
Joined: 10th Mar 2018
Location:
Posted: 12th Mar 2018 23:53
I'm trying to get my 3d game in first person. I want it to be able to look around with the pointer/mouse. I saw a thread on this but the solution is with the old AppGameKit, here is the link to that https://forum.thegamecreators.com/thread/158868. I've tried to update the old code but it just isn't working out. Can someone provide me with a code that can do the this and that is up to date?

thanks in advance, Doug
IronManhood
9
Years of Service
User Offline
Joined: 6th Feb 2015
Location: US
Posted: 13th Mar 2018 08:06
Look at the example projects. 3D/3D-FirstPersonExample.
Rick Nasher
7
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 14th Mar 2018 19:25
There isn't much of a difference of a 3rd person camera. If you have that going you can just move the cam to front of the player.
doug
6
Years of Service
User Offline
Joined: 10th Mar 2018
Location:
Posted: 15th Mar 2018 22:57
[href]null[/href] can you give me a link to that example project? I can't seem to find it online. Thanks.
Rick Nasher
7
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 17th Mar 2018 07:52 Edited at: 17th Mar 2018 07:53
He probably means the one in the examples that come with AGK.
Depending on your installation (you get to choose your project directory during install, can also be changed after) should be somewhere on your drive.


E.g. mine is in here:
D:\Install\Appz\Programming\AGK\_Projects\3D\3D-FirstPersonExample\

If no changes made then probably in:
C:\Program Files (x86)\The Game Creators\AGK2\Projects\3D\3D-FirstPersonExample\
doug
6
Years of Service
User Offline
Joined: 10th Mar 2018
Location:
Posted: 18th Mar 2018 18:25
thank you Rick Nasher, I found it!
doug
6
Years of Service
User Offline
Joined: 10th Mar 2018
Location:
Posted: 18th Mar 2018 18:43
wait, one more problem, the example allows me to look around the scene, but I need to hold my left mouse button, is there a way I can use the mouse to look around without holding the left mouse button?
Rick Nasher
7
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 18th Mar 2018 23:36 Edited at: 18th Mar 2018 23:56
Yes there is.

You can take a look at this piece of code; Universal 1st/3rd person AppGameKit framework(without physics)

I'm actually still working on this but it's a work in progress. I haven't updated it yet for ironing out things, perfecting, adding to it a lot and don't want to confuse people. But the basics are there for you to get the idea.

EDIT:





Little screenies that show's what I'm doing currently:


Lot's of stuff is being done under the hood, so not focusing on gfx for now.
doug
6
Years of Service
User Offline
Joined: 10th Mar 2018
Location:
Posted: 20th Mar 2018 22:38
Rick Nasher, I have tried the code snippet you provided, but it's not really what I was looking for. I am trying to get a first-person game that allows you to look around the game by moving your mouse. It is like every first-person game.
puzzler2018
User Banned
Posted: 20th Mar 2018 22:53

Golelorn
8
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 21st Mar 2018 02:52 Edited at: 21st Mar 2018 02:52
not sure what you want, but here is my code to scroll up, down, left, right and diagonally.
Rick Nasher
7
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 21st Mar 2018 23:20 Edited at: 21st Mar 2018 23:20
Ok, get what you mean. Was an old version which probably didn't have first person mode installed yet.
Newer version does, see download here: https://forum.thegamecreators.com/thread/221892#msg2621724

Press F3 for changing between:
3rd person mode
1st person mode
detached cam mode
spin cam mode1+2(experimenting still)
top view mode

Basically first person mode is similar to third person mode, camera is just more in front instead behind the player and body parts are set invisible except the gun. You could change this into showing hands of course and rip out all the other cam features.

Controls: Use mouse to look round, right mouse to move forward, or use W,A,S,D or cursor keys. (Key info is displayed on screen also)

Hope this helps.

Login to post a reply

Server time is: 2024-11-27 14:24:21
Your offset time is: 2024-11-27 14:24:21