Jump to content

Unable to get FPSplayer to work?


WSI
 Share

Recommended Posts

Hello,

I'm trying to get a character to walk around in the environment, and have followed the information here:
https://www.leadwerks.com/learn?page=Tutorials_Games_First-Person-Shooter_Character-Controllers
and here:
https://www.moddb.com/engines/leadwerks-engine/videos/tutorial-fps-character-controller-in-leadwerks
... which seem to concur with each other.

But, for some reason, when I run the project, I just get a black screen and am unable to walk on anything. I've tried it in a blank project, creating my own platforms to walk on, etc. And again in a "First-Person Shooter" project template. It doesn't work in either case.
 


image.png.76cb4a3d491c8cc67b8ccf3d08dc61b4.pngimage.png.aee92d85570fce57af188b42e159da46.png
 

This is all attached to the "generic" character model.

I'm noticing, too, that sometimes when I go back to the Script tab, the 'File' field is empty and I have to select the FPSPlayer.lua script again. This happens even if I save the project and re-open it.

What would I be doing wrong here?

Thanks

Link to comment
Share on other sites

First of all, does your ground surface have a collider?

 

If so:

Sounds like it's a problem with the camera. Do you perhaps have another camera created in a script elsewhere? Or is your player body material double-sided? Also, are you using the built-in script or a modified one?

I would try starting a new map and attaching the script to a plain cylinder stampy-thing (I forget what they are called, but there are slopes and boxes of them as well). That *should* work out of the box (if the cylinder has a character controller)

i now hate love C++

Beeeeeeeeeeeeeep~~This is a test of the emergency signature system~~Beeeeeeeeeeeeeep

RX 6800XT | i5-13600KF | 32GB DDR5 | 1440p is perfect

Link to comment
Share on other sites

lol.. Okay. I don't know why, but now it's working.

Just set up a new scene exactly as I showed in those screengrabs, but it didn't work before.
Now it's working.

Color me confused.

Welp. lol

 

  • Like 1
Link to comment
Share on other sites

7 hours ago, Thirsty Panther said:

Sounds like you had 2 cameras. 

The first was in the scene/map that you made to "walk" around.

The second is generated in the fps  script that you attached to the player.

This causes the black screen.

If you just remove the camera in your map it should work fine.

That's the weird part. I'd done that, and it was still not working. 
I honestly couldn't tell you what I did differently. I couldn't reproduce the problem - not that I'm complaining of course.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...