Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Help with CopperCube
Sniper gun in coppercube

mraagney
Registered User
Quote
2021-03-21 07:50:50

so i wanna make a sniper gun which when right-clicked ,will show a zoomed in view of the area and a crosshair,and when you left-click it will shoot the bullet from the crosshair. I know how to do an action when a key clicked and also crosshair,can you tell me how to do the other stuff ,thanks


count2rfeit
Registered User
Quote
2021-03-21 16:20:11

I had shared a .ccb file some time ago that shows how I did it.

here is a new link.

https://www.mediafire.com/file/i...

hope it helps


mraagney
Registered User
Quote
2021-03-21 16:52:01

thanks that helps!


count2rfeit
Registered User
Quote
2021-03-21 17:30:37

of course, there are better ways to do it... for example, you really don't need 2 cameras - you can just use:

ccbSetSceneNodeProperty(Camera1, "FieldOfView_degrees", 4);

to zoom in for the scope, and then reset it to zoom back out.

or use the post effects 'vignette' to make the scope view area -

anyway, good luck on your project...


manoel gomes
Guest
Quote
2021-06-17 15:57:38

there is a script in the scripts list that will do exactly what you are looking for the script name is: Camera zoom by right mouse button
i Hope this helps


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "?nternational" (you are not logged in)


Text:

 

  

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


   






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