Anything to do with physics. Rigid Bodies, Kinematic controllers, vehicles etc.

Camera Goes Through Walls

Camera Goes Through Walls

Postby ozziedave » 02 Feb 2016, 07:07

Hi All, I have shown my Setup below for my RPG Character, the Camera follows the Player from a couple of metres behind.
The Player is turned by the Mouse, which is fairly usual with an RPG. The Player itself does not go through Buildings/Walls
but on turning the Player with the Mouse near a Building/Wall causes the camera to go through the Building/Wall, not a
good look for a game.

I may not have correct settings for some of the components ?. I am not sure if the Player Camera V2 Custom settings are
CLOSE & FIRM or HACK n SLASH as you cannot see which one you may have selected, also I am not sure if I need all of the
RPG Player Components, but it seems to work, as the Player walks in my selected direction and fights my NPC ok.

I am using the Character_Player_Melee Script.

Any help would be appreciated.

Image
User avatar
ozziedave
Skyline Apprentice
 
Posts: 27
Joined: 16 Jan 2016, 12:30

Re: Camera Goes Through Walls

Postby SolarPortal » 02 Feb 2016, 12:01

camera's currently do not have the option for stopping them going through the wall as this would need to be created or scripted yourself.

There is a tech demo in the "Asset Library/Scenes/Tech Demos/" called "Lua - Basic Cam with Terrain Detection"
This has a script which uses a -Y axis check to stop the camera going through the ground.

If you applied the same sort of technique and fired a ray out the back, sides, top & bottom(covered in demo), then you would stop a camera moving through the walls.

Hope this helps :)
Skyline Game Engine - Lead Dev.
Please provide as much info as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 4770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860

Twitter: @SolarPortal
Instagram: @SolarPortal
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: Camera Goes Through Walls

Postby ozziedave » 04 Feb 2016, 05:14

G'day SolarPortal, I had a look at Tech Demo/" called "Lua - Basic Cam with Terrain Detection, and found that it went through
the Terrain also, perhaps I did not get what it was suppose to do ?.

Would it be possible for StarFire, the Wiz at LUA, to place the required code in the PLAYER CAMERA V2. The Code attached to
the 'Basic Cam with Terrain Detection' seemed to be very short, I don't know of any other Game Maker that has Camera's that
go through Buildings and walls when used in RPG Games.

I do not have the expertise in LUA to programme the Camera's myself.
User avatar
ozziedave
Skyline Apprentice
 
Posts: 27
Joined: 16 Jan 2016, 12:30

Re: Camera Goes Through Walls

Postby SolarPortal » 04 Feb 2016, 11:42

oh, did you press play as the camera in the scene takes over and stops you from going through the ground... or the demo is broken lol :P

We tend to use the newer Camera Entity rather than the v2 action anymore as it is more customizable and fully scriptable.
I have mentioned this to StarFire, so it is added to the list of mechanics required for the engine now :D
Skyline Game Engine - Lead Dev.
Please provide as much info as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 4770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860

Twitter: @SolarPortal
Instagram: @SolarPortal
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: Camera Goes Through Walls

Postby ozziedave » 04 Feb 2016, 12:47

I did press play, the Demo maybe Broken !!!. Which is the new Camera ?.
User avatar
ozziedave
Skyline Apprentice
 
Posts: 27
Joined: 16 Jan 2016, 12:30

Re: Camera Goes Through Walls

Postby SolarPortal » 04 Feb 2016, 13:58

Yes, i suspect the demo is broken and will be something we look into for the next release.

As for the new camera entity. In the terrain scene, you will see the blue camera model. This is the newer entity and is far more customizable and even scriptable to create unique and better cameras.

It can be found in the Right Click context menu when right clicking in the scene.
go to Cameras, and add a 2D Fixed Camera; then change the settings from fixed to fly or custom. If you choose custom a new drop down appears with other camera modes.
When one of these camera modes is selected, make sure to set the defaults by clicking the button that appears under the new blue header that appears.

This camera still does not have collisions on walls. We feel that the engine should provide this feature and so we will and as mentioned before, StarFire has added it to her list :)

Hope this helps :D
Skyline Game Engine - Lead Dev.
Please provide as much info as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 4770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860

Twitter: @SolarPortal
Instagram: @SolarPortal
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: Camera Goes Through Walls

Postby StarFire » 04 Feb 2016, 15:41

@ozziedave: I have a few tasks still to do with the new Modular FPS System but I will have a look and see if there is a way we can add the camera blocking quickly for you. Added your request to my job list :)

Screen grab of current 3rd person dev area.
Image
Dream the Journey, Live the Experience!
User avatar
StarFire
Skyline Founder
Skyline Founder
 
Posts: 1678
Joined: 03 Jan 2012, 18:50
Location: UK
Skill: Great creative
Skill: Programmer
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer

Re: Camera Goes Through Walls

Postby ozziedave » 04 Feb 2016, 23:24

G'Day Starfire, don't forget that I am using the Camera for an RPG !!

The Image above looks fantastic, and should be a great Introduction to Skyline FPS, not to be too Picky but the Demo's
showing an FPS Scene, and fighting Imps definitely need updating.

One other frustrating problem is the continuing errors, and shutting down of Skyline, to numerous to mention.

The Editor, and the many Secondary Editors are fantastic, and the work flow is second to none, when all of the Bugs
are ironed, out and the ongoing coding is completed it will be a great Engine.

Keep up the good work.
User avatar
ozziedave
Skyline Apprentice
 
Posts: 27
Joined: 16 Jan 2016, 12:30

Re: Camera Goes Through Walls

Postby ozziedave » 05 Feb 2016, 06:54

Hi SolarPortal, Tried the New Blue Camera but does not work the way I wanted it to do.

The only Camera that seems to work well is the PLAYER CAMERA V2, except for going through walls etc.

See Video:

View My Video
User avatar
ozziedave
Skyline Apprentice
 
Posts: 27
Joined: 16 Jan 2016, 12:30

Re: Camera Goes Through Walls

Postby SolarPortal » 05 Feb 2016, 13:28

Yes, i see it :) Camera collision is the only thing that will be needed and will be added to both the action (Player Camera V2) and the Camera Entity.

At some point, i will put a video up about using the newer camera entity as it can be a little confusing lol :P
Skyline Game Engine - Lead Dev.
Please provide as much info as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 4770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860

Twitter: @SolarPortal
Instagram: @SolarPortal
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: Camera Goes Through Walls

Postby StarFire » 05 Feb 2016, 16:49

@ozziedave: thanks it is going to take a little time to get Skyline smooth and bug free but when she gets there what a cool bit of tech she will be. As a response to the crashes and losing scenes which I have had way too many times. There is now a new auto save feature which is very welcoming. ;)

The above image is of a third person controlled character which uses the same camera technique you are using in your project. I see you are working on a hack and slash and mine is a shooter but I think the hud is a little misleading as I am using the FPS hud with the TP character but it does for testing purposes lol ;)

We will get one of the camera systems to have collision detection, if you can bear with it for now that would be great. Are you just looking for it to move away from walls, roofs etc when near structures or would it use the object fade technique used some current games? Although the blocking method is more possible as the fade requires a system change which can slow down rendering so hope you want the camera blocking lol :D
Dream the Journey, Live the Experience!
User avatar
StarFire
Skyline Founder
Skyline Founder
 
Posts: 1678
Joined: 03 Jan 2012, 18:50
Location: UK
Skill: Great creative
Skill: Programmer
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer

Re: Camera Goes Through Walls

Postby TattieBoJangle » 05 Feb 2016, 16:59

I cant talk for ozziedave but I would prefer camera collision it will be interesting to see how you pull it off for example if the camera gets stuck in like a corner or something similar.

will you make it so the camera gets closer to the player as it collides with say a wall ?
Case: CM Storm Trooper CPU: I7 5930k X99 Cooler: Noctua NH-D15 Graphics: Asus GTX 1080 Motherboard: Rampage Extreme V x99 Ram: RipJaws DDR4 3000mhz Storage: x2 SSD Crucial 500GB + x5 2TB Hdd PSU: Evga 1500w OS: Windows 10
User avatar
TattieBoJangle
Community Manager
Community Manager
 
Posts: 858
Joined: 26 Jan 2015, 00:15
Location: United Kingdom
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer
Skill: Great creative

Re: Camera Goes Through Walls

Postby StarFire » 05 Feb 2016, 17:11

Yes there are going to be a few challenges lol not as easy task as it sounds. ;)

The camera will move closer to the play as this would be our preferred method. ;)
Dream the Journey, Live the Experience!
User avatar
StarFire
Skyline Founder
Skyline Founder
 
Posts: 1678
Joined: 03 Jan 2012, 18:50
Location: UK
Skill: Great creative
Skill: Programmer
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer

Re: Camera Goes Through Walls

Postby ozziedave » 05 Feb 2016, 21:20

I'll go along with Tattie Bo, just don't want to see the other side of a Building etc.

Unfortunately every time I change just about anything in a Scene or Properties, and restart Game in the Editor I get a Shutdown.
I have been lately just importing the scene again before a restart, that seems to work 60% of the time, with no Shutdown.

Still have Hi Hopes for Skyline.
User avatar
ozziedave
Skyline Apprentice
 
Posts: 27
Joined: 16 Jan 2016, 12:30

Re: Camera Goes Through Walls

Postby StarFire » 05 Feb 2016, 21:42

ok Cool :)

Also If you have an example or workflow you can provide which causes the crash, please let us know so we can fix it for you ;)
Dream the Journey, Live the Experience!
User avatar
StarFire
Skyline Founder
Skyline Founder
 
Posts: 1678
Joined: 03 Jan 2012, 18:50
Location: UK
Skill: Great creative
Skill: Programmer
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer

Re: Camera Goes Through Walls

Postby ant0N » 06 Feb 2016, 17:45

hi all! also decided to make such a possibility, I think it looks good. :D
I still need to fix a few bugs before I can put it on the asset store.
Sorry for my English. :)
User avatar
ant0N
Skyline Moderator
Skyline Moderator
 
Posts: 415
Joined: 02 Nov 2012, 12:49
Location: Россия, Москва
Skill: Programmer
Skill: 3D Modeller

Re: Camera Goes Through Walls

Postby StarFire » 06 Feb 2016, 17:53

Great work on the camera antON :D

Look forward to seeing it completed :D
Dream the Journey, Live the Experience!
User avatar
StarFire
Skyline Founder
Skyline Founder
 
Posts: 1678
Joined: 03 Jan 2012, 18:50
Location: UK
Skill: Great creative
Skill: Programmer
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer

Re: Camera Goes Through Walls

Postby SolarPortal » 06 Feb 2016, 18:06

Nice one antON! :) This will help some users greatly and save us some time. Thanks :)
Skyline Game Engine - Lead Dev.
Please provide as much info as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 4770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860

Twitter: @SolarPortal
Instagram: @SolarPortal
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: Camera Goes Through Walls

Postby TattieBoJangle » 06 Feb 2016, 19:09

:o boy that was fast! great work anton as usual :D
Case: CM Storm Trooper CPU: I7 5930k X99 Cooler: Noctua NH-D15 Graphics: Asus GTX 1080 Motherboard: Rampage Extreme V x99 Ram: RipJaws DDR4 3000mhz Storage: x2 SSD Crucial 500GB + x5 2TB Hdd PSU: Evga 1500w OS: Windows 10
User avatar
TattieBoJangle
Community Manager
Community Manager
 
Posts: 858
Joined: 26 Jan 2015, 00:15
Location: United Kingdom
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer
Skill: Great creative

Re: Camera Goes Through Walls

Postby ozziedave » 07 Feb 2016, 07:56

G' Day Anton, Just what the Doctor ordered. Would it be at all possible to show the Bandy fellow going into the tent item
and turning around a bit ?.

I will purchase ASAP.
User avatar
ozziedave
Skyline Apprentice
 
Posts: 27
Joined: 16 Jan 2016, 12:30

Re: Camera Goes Through Walls

Postby ant0N » 07 Feb 2016, 09:03

thanks guys! :D
ozziedave, if you send me your scene, I could configure it and return it to you .
this camera is part of a larger script and it will not work separately. In this script include: player management, automatic control animations, sounds, ai opponents and melee.
Sorry for my English. :)
User avatar
ant0N
Skyline Moderator
Skyline Moderator
 
Posts: 415
Joined: 02 Nov 2012, 12:49
Location: Россия, Москва
Skill: Programmer
Skill: 3D Modeller

Re: Camera Goes Through Walls

Postby ozziedave » 08 Feb 2016, 04:18

Anton, not sure if the Scene file with Binary attached Includes the Player, as I know nothing about this file, also would have to
find some site to host the file, as this forum cannot upload files.

Regards
User avatar
ozziedave
Skyline Apprentice
 
Posts: 27
Joined: 16 Jan 2016, 12:30

Re: Camera Goes Through Walls

Postby CreativeOcclusion » 08 Feb 2016, 05:29

You could use Google Drive...It's free and works well...
Thanks, CreativeOcclusion
User avatar
CreativeOcclusion
Skyline Warrior
 
Posts: 366
Joined: 22 Jun 2015, 19:34
Location: Texas

Re: Camera Goes Through Walls

Postby ant0N » 08 Feb 2016, 09:50

ozziedave wrote:Anton, not sure if the Scene file with Binary attached Includes the Player, as I know nothing about this file, also would have to
find some site to host the file, as this forum cannot upload files.
Regards

Hi! ;)
Do you need to use Resource Collector to transfer your project to a separate folder.
Image

Image

After that you need to pack the project folder into an archive and upload to any file exchanger.
Sorry for my English. :)
User avatar
ant0N
Skyline Moderator
Skyline Moderator
 
Posts: 415
Joined: 02 Nov 2012, 12:49
Location: Россия, Москва
Skill: Programmer
Skill: 3D Modeller

Re: Camera Goes Through Walls

Postby ozziedave » 17 Feb 2016, 05:40

Many Thanks anTON, After downloading my re-jigged Scene Data, my Player did not go thru the tent. You coded a Camera that
zoomed in on the Player when he got close to the Tent Walls, changing the player lua code. Great work, well done.

Many Thanks

Ozzie
User avatar
ozziedave
Skyline Apprentice
 
Posts: 27
Joined: 16 Jan 2016, 12:30


Return to Physics

Who is online

Users browsing this forum: No registered users and 4 guests