ambiera logo

Ambiera Forum

Discussions, Help and Support.

folder icon Ambiera Forum > CopperCube > Help with CopperCube
forum topic indicator How to make DOOM fps camera & movement (NO mouse) controls?
person icon
icerazor
Registered User
Quote
2023-07-25 00:16:53

The built-in First Person Shooter camera uses the mouse point as the view focus.
I don't want to use the mouse at all for viewing.
I want something similar the to the "old school" DOOM controls.

W and Arrow UP = Forward
S and Arrow Down = Backward Walk
A and Arrow Left = Rotate -90 counterclockwise
D and Arrow Right = Rotate 90 clockwise

Shift = Jump (optional)

Can someone help me figure out how to implement this into the game?

person icon
VP
Guest
Quote
2023-07-25 07:31:02

Before First Draw (and also on reload):
Set Variable "W" =0
Set Variable "A" =0
Set Variable "S" =0
Set Variable "D" =0

When W key is pressed:
If Variable "W" =0,
Change Position of "Player_node" (vector in facing direction) 0,5,0
Set Variable "W" =1

When A key is pressed:
If Variable "A" =0,
Change Position of "Player_node"(vector in facing direction) 0,-5,0
Set Variable "A" =1

When A key is pressed:
If Variable "A" =0,
Rotate "Player_node" (rotate by rotation) 0,-90,0
Set Variable "A" =1

When S key is pressed:
If Variable "S" =0,
Rotate "Player_node" (rotate by rotation) 0,-90,0
Set Variable "S" =1

When W key is released:
Set Variable "W" =0

When S key is released:
Set Variable "S" =0

When A key is released:
Set Variable "A" =0

When S key is released:
Set Variable "S" =0

person icon
VP
Guest
Quote
2023-07-25 07:34:54

I'm dyslexic - I made a mistake with the letters, hopefully you can see what I did wrong and make it work by substituting the correct letters.

person icon
VP
Guest
Quote
2023-07-25 07:37:29

I think this version is correct....

Before First Draw (and also on reload):
Set Variable "W" =0
Set Variable "A" =0
Set Variable "S" =0
Set Variable "D" =0

When W key is pressed:
If Variable "W" =0,
Change Position of "Player_node" (vector in facing direction) 0,5,0
Set Variable "W" =1

When A key is pressed:
If Variable "A" =0,
Change Position of "Player_node"(vector in facing direction) 0,-5,0
Set Variable "A" =1

When S key is pressed:
If Variable "S" =0,
Rotate "Player_node" (rotate by rotation) 0,-90,0
Set Variable "S" =1

When D key is pressed:
If Variable "D" =0,
Rotate "Player_node" (rotate by rotation) 0,90,0
Set Variable "D" =1

When W key is released:
Set Variable "W" =0

When S key is released:
Set Variable "S" =0

When A key is released:
Set Variable "A" =0

When S key is released:
Set Variable "S" =0


Create reply:










 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


icon_holyicon_cryicon_devilicon_lookicon_grinicon_kissicon_monkeyicon_hmpf
icon_sadicon_happyicon_smileicon_uhicon_blink   






Copyright© Ambiera e.U. all rights reserved.
Contact | Imprint | Products | Privacy Policy | Terms and Conditions |