Colour/transparency of object not loading in scene

thanks. i’ll look at using mouse controls and if i have troubles i’ll ask.

the rendering is a bit wierd it does this near teh end of my render distance

Well, you do have an enormous far-distance; I’d guess that you’re seeing depth issues as the mathematical resolution of the depth-buffer starts to become shaky.

(I’m not sure of how open-world games handle this sort of issue, but I suspect that it’s a little more complex than just extending the camera’s far-distance out to the desired range. It might be worth your doing some research to discover how it’s done!)

if i scale everything down, so the camera, if it started at 0, 0, 100, would instead start at 0, 0, 1, and if the model was scaled up by 1000, it would be come scaled up by 10, would that work?

.

It’s hard to say, without knowing quite what you’re trying to do. It might–I’d suggest giving it a try!

(If you find that it feels too “small”, you might try playing with the camera’s field-of-view, as that can I think affect the apparent scale of a scene.)

it works without having to change teh fov, but thanks

1 Like

is there a built-in function for mouse controls or do i have to make my own script (or copy and paste from the internet)
Also, how do I change the position of the mouse? Somehting like self.mouse.setPos(0, 0, 0)

UPDATE:
I found out how to set the mouse pos with self.win.moveCursor() but I don’t know what the exact position of the center of the screen would be.

To start with, let me ask you to perhaps start making separate threads for new issues, please: it may help others in the future who have similar problems to more easily find answers.

That said, to answer your question, there is no such built-in function–it’s something that you would implement yourself. (Although with some searching you may find examples on the forum…)

As to changing the position of the mouse, I’d suggest again looking around the forum! In particular, such things may be done when making first-person games, so examples on the forums of first-person controllers may demonstrate how to do it.

thanks

1 Like

Now the same thing is happening with render2d

My apologies if this is the obvious, but have you tried the same solution?

wat? you can reparent lights to render2d? why would you need to do that? I guess we need to have better lighting on my oxygen meter as i slowly drown!!

The “render2d” node is just another scene-node–you can do all the usual things with it, I believe.

As to why you’d want to, well, you presumably have a model with a material, and my understanding is that materials only really function properly under lighting. I suppose that a material describes how a surface reacts to light, in which case it doesn’t make much sense without light (or intentional darkness).

(Note that one can also just have geometry that has a texture applied, but no material, in which case no light is required. This is how my 2D UI-elements tend to be constructed, if I’m not much mistaken.)