Ambiera ForumDiscussions, Help and Support. |
|
[ 1 2 3 ] Page 2 of 3 |
|
|||||
|
Yes, I can create a new attribute or API command to change the direction of the spotlight programmatically, but still I won't be able to do any editor-related stuff, I tried doing similar with sound nodes to have pitch and speed and other functionlaity and they did work but only for the first sound node in the scengraph, except that sound node all other sound node not gets embedded into the game. So I am not sure if adding the attribute for direction for the spotlight, will have a similar issue of having it work for node or not. But yeah, I can create an API command for it, but it would have been much better if we have the direction attribute built directly into the editor, and also exposed to the scripting api. |
||||
|
Cool - I think you can do it ! I only need it for a single node anyway - the player spot light. It would appear from some testing that I only needed to get the Camera Target and normalize it to get the new Direction for the Directional Light / Spot Light (seemed to work ok). If you get something working please post somewhere so I can test it out - before next years update....I'm able to use Studio now... |
||||
|
Can we make a spotlight by using a point light with a mesh that block the light from all other angle, light a real Spotlight did? |
||||
|
I didn't understand what you wanna achieve but by going to irrlicht/irredit properties, you can change the type of light from point to spotlight and it will act as spotlight. So don't really get why we need a mesh that blocks the light from directions. |
||||
|
Yeah we can’t do that, the light still go through the mesh anyway. Only directional light get block by mesh when shadow on |
||||
|
Well damn - I just got it working ! I just edited the "CFlaceLightSceneNode.cpp" file to include direction on Spot lights and badda boom - she works now Hah ! Then I ran this code below every 20ms in the CCB file: var mouseX = ccbGetMousePosX(); var mouseY = ccbGetMousePosY(); var end = ccbGet3DPosFrom2DPos(mouseX, mouseY); end.normalize(); ccbSetSceneNodeProperty(spot, "Direction",end); Runs quite well now....crap...in Debug mode for Win32 |
||||
|
For someone with zero knowledge of C++ was able to do this in a few minutes (once I found the file to update) - don't know why Niko didn't think it was worth his few seconds to update... |
||||
|
The client source of CC is different than the editor source or final source of CC, so it is not just copy pasting stuff or adding lines of code, he needs to make sure that the code doesn't break other stuff. If you have seen the twitter image of the preview of Darkmode of CC then you might already have seen it, there was an extra parameter "Reload Shadow Shaders" in the attribute section of root scene node, which is not in the final version of the editor, that code was there for debug version of the editor only. btw glad that you are able to find a fix for your problem. Even if that file gets updated , it won't show the direction attribute in the irrlicht/irredit options, but it can only be accessible via scripting api. |
||||
|
@Robbo I don't know if it helps you, try these steps. 1)enable the menu irredit\irrlicht properties 2)create a Directional light 3)select the direction target 4)turn the Directional light into spot from the irredit\irrlicht properties menu. 5)move the selected target ( important if you deselect the target it disappears). |
||||
|
Thanks pmax but was using that method before. For a torch/flashlight effect however this cant be used as previously spot lights had no Direction attribute - after my change now it does in the source code so can now change direction just like a Directional light. Niko would have to add the 2 small changes though for anyone else to use this. When he does I would publish a free CCB with code to show player flashlight. |
||||
|
I just just worked out how to change FPS camera rotation speed, jump speed and 'can fly' options and they are all working now....was not even hard to do....hahah....oh dear...this is fun.... Not sure if Nio will add to the list this year....well see.... |
||||
|
Possible new commands for the FPS camera controller are: Player1.rotationspeed Player1.jumpspeed Player1.canfly Updated using the 'Set or Change a Variable' command just like you already do for health, movementspeed and damage. See if Niko wants toa dd that in... |
||||
|
Fixed a major bug that was breaking the command ccbSetSceneNodePositionWithoutCollision() when using physics simulation. It now changes the position without the collision even when using physics simulation. |
||||
|
Could you please tell when it's going to be released? I think this will fix my sheep driving game:) wrote:
Fixed a major bug that was breaking the command ccbSetSceneNodePositionWithoutCollision() when using physics simulation. It now changes the position without the collision even when using physics simulation. |
||||
|
SHEEP driving game? Now THAT sounds fun! I'd like to see some screenshots! What are they driving? Dune buggies? Golf carts? Go carts? Sounds zany! I can hear the knee-slapping bluegrass music already! wrote:
Could you please tell when it's going to be released? I think this will fix my sheep driving game:) wrote: Fixed a major bug that was breaking the command ccbSetSceneNodePositionWithoutCollision() when using physics simulation. It now changes the position without the collision even when using physics simulation. |
[ 1 2 3 ] Page 2 of 3 |
|